caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christophe TROESTLER <debian00@tiscali.be>
To: siegfried.gonzi@stud.uni-graz.at
Cc: brian.hurt@qlogic.com, caml-list@inria.fr
Subject: [Caml-list] Re: IEEE-754 (was: Easy solution in OCaml?)
Date: Sun, 27 Apr 2003 18:33:47 +0200 (CEST)	[thread overview]
Message-ID: <20030427.183347.106461378.debian00@tiscali.be> (raw)
In-Reply-To: <Pine.LNX.4.33.0304261611000.3160-100000@eagle.ancor.com>

On Sat, 26 Apr 2003, Brian Hurt <brian.hurt@qlogic.com> wrote:
> 
> On Sat, 26 Apr 2003, Siegfried Gonzi wrote:
> 
> > dividing the two vectors:
> > (vector 0.0 0.0  23.34 23.4) through (vector 0.0 0.0 0.0 23.4)
> > 
> > (vector #f #f #f 1.0)
> 
> Hmm?  What platform are you on?  Linux on x86:
> 
> # let x = [ 0.0 ; 1.0 ; 0.0 ; 1.0 ]
>   and y = [ 0.0 ; 0.0 ; 1.0 ; 1.0 ] ;;

List.map2 ( /. ) x y

> - : float list = [nan.; inf.; 0.; 1.]

This is a feature of IEEE-754 arithmetic which means it should work
this way on virtually all architectures.

BTW, may I take this opportunity to advertise my little wishlist in
this respect ?  I'd like to have:

FAST is_nan : float -> bool 
     is_finite : float -> bool
               (I know it is possible to define them with
                classify_float but is is not fast)
and  copysign : float -> float -> float

Cheers,
ChriS

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  parent reply	other threads:[~2003-04-27 17:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-25  6:05 [Caml-list] Easy solution in OCaml? Siegfried Gonzi
2003-04-25  8:19 ` sebastien FURIC
2003-04-25 15:46 ` Brian Hurt
2003-04-25 16:34   ` Ville-Pertti Keinonen
2003-04-26 13:45   ` Siegfried Gonzi
2003-04-26 21:51     ` Brian Hurt
2003-04-27 15:01       ` Siegfried Gonzi
2003-04-28 15:43         ` Brian Hurt
2003-04-29  5:46         ` John Max Skaller
2003-04-27 16:33       ` Christophe TROESTLER [this message]
2003-04-25 16:59 ` Markus Mottl
2003-04-26  6:25   ` Siegfried Gonzi
2003-04-27 14:13   ` Siegfried Gonzi
2003-04-27 16:54     ` Eray Ozkural
2003-04-28  5:00       ` Siegfried Gonzi
2003-04-28 17:45 ` malc
2003-04-28 18:16   ` Shivkumar Chandrasekaran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030427.183347.106461378.debian00@tiscali.be \
    --to=debian00@tiscali.be \
    --cc=brian.hurt@qlogic.com \
    --cc=caml-list@inria.fr \
    --cc=siegfried.gonzi@stud.uni-graz.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).