On 10 September 2016 at 08:38, Waldek Hebisch <[email protected]> wrote:
>>
>> What's the right thing to do?
>>
>> (1) -> 0.0 ^ (0::NNI)
>>
>>    (1)  1.0
>>                                                                   Type: Float
>> (2) -> 0.0 ^ (0::INT)
>>
>>    >> Error detected within library code:
>>    0^0 is undefined
>
> For exact exponsnts it should give 1.
>
>> (4) -> (0.0^0.0)$DFLOAT
>>
>>    >> System error:
>>    arithmetic error SB-INT:ARGUMENTS-OUT-OF-DOMAIN-ERROR signalled
>> Operation was EXPT, operands (0.0 0.0).
>> See also:
>>   The ANSI Standard, Function EXPT
>
> For approximate exponents it make sense to leave it undefiend
> (and signal errors when users try to use it).
>

Are 0$DFLOAT and 1$DFLOAT really only approximate in FriCAS? In
general I thought the most consistent approach to floats was to treat
all (representable) floating point numbers as exact but to admit that
floating point operations are often necessarily approximate.

Apparently before SBCL 1.0.41.47, SBCL used to return

(expt 0.0 0.0) -> 1.0

https://bugs.launchpad.net/sbcl/+bug/571581

But is there any good reason that FriCAS should follow this "standard"?

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to