>
> Sorry Carl it is not clear to me that you called {SINGLE_MATH}.sqrt without
> getting this exception. I did this on Windows Vista and wonder if it is an
> operating system issue.
>
> Regards
> Chris Saunders
>
>
> ----- Original Message -----
> From: carl94706
> To:
[hidden email]
> Sent: Sunday, October 18, 2009 4:07 PM
> Subject: [eiffel_software] Re: Wondering about this
>
>
> When I tried this (on a mac with version 6.4) I got an "inf" as a result.
> No exception.
>
> Carl
>
> --- In
[hidden email], "Chris Saunders" <evas@> wrote:
> >
> > Not so Roger. Here is the output from `Positive_infinity': 1.#INF which
> > represents +infinity on my machine. To get NaN one needs to divide 0 by 0.
> > I believe this would be the case on all machines that use IEEE.
> >
> > Regards
> > Chris Saunders
> >
> > ----- Original Message -----
> > From: rfo@
> > To:
[hidden email]
> > Sent: Sunday, October 18, 2009 9:04 AM
> > Subject: RE: [eiffel_software] Wondering about this
> >
> >
> > Hi Chris!
> >
> > My guess is because 1.0/0.0 is a NAN (not a number) and if used in most
> > fp ops will raise an FPE (floating point exception)
> >
> > R
> >
> > ==================================================
> > Roger F. Osmond
> >
> > > -------- Original Message --------
> > > Subject: [eiffel_software] Wondering about this
> > > From: "Chris Saunders" <evas@>
> > > Date: Sun, October 18, 2009 4:37 am
> > > To: "Eiffel Software Mailing List" <
[hidden email]>
> > > In class SINGLE_MATH sqrt is defined like this:
> > > sqrt (v: REAL): REAL
> > > -- Square root of `v'
> > > require
> > > v >= 0.0
> > > external
> > > "C signature (double): double use <math.h>"
> > > alias
> > > "sqrt"
> > > end
> > > I have a class where I define +infinity like this:
> > > Positive_infinity: REAL_32
> > > -- Positive infinity.
> > > local
> > > n, d: REAL_32
> > > once
> > > n := {REAL_32}1.0
> > > Result := n / d
> > > end
> > > Now if I call `sqrt' from SINGLE_MATH with the above `Positive_infinity'
> > > I
> > > get the error "Precondition violated." from SINGLE_MATH. Does this seem
> > > correct?
> > > Regards
> > > Chris Saunders
> >
>