Audrey Tang wrote: > That seems to follow from the standard (ruby, ocaml, mzscheme currently > does that), but some may also argue for NaN bothways (ghc, js) or an > exception bothways (perl5, python).
Er, wait, ghc also raises an exception for (div 0 0), because it distinguishes integer (div) with fractional (/). However, I think one of P6's idea is that the user should not have to care between 0 and 0.0's behaviours, so maybe it makes sense to do the same thing (be it NaN or exception) both ways. I'm not sure that IEEE 754/854 still applies if we want to merge the behaviours of int/num/complex/bigint/bigrat/bignum under a Num banner. (There is always the worse-is-better option of going with whatever the underlying runtime does, usually determined by hardware/libm.) Audrey
signature.asc
Description: OpenPGP digital signature