Basically the standard defines 6 roundings

Rounding To Nearest either
1) (Half) Tied away from Zero
2) (Half) Tied to Even

Rounding Towards (Directional Rounding)
3) +Infinity
4) -Infinity
5) Zero

The IEEE854 2008 standard (well IEC 60559 which is part of ISO)

a)      mandates 'rem' by (2). Almost everybody obeys it because it was
        a relivatively recent addition. Julia does not.

b)      says nothing about and 'mod' but
        - C99 and D and Fortran chose (1) (trunc)
        - Chapel and Julia chose (4) (floor)

Interesting that Chapel and Julia made the same choice.

Maybe we need a way to do Modulus ALL five different ways?

Executive/Consensus Decisions?

Regards - Damian

P.S. That Reference for Julia is (by the way) is

http://docs.julialang.org/en/release-0.1-0/manual/mathematical-operations/

At least Julia has 2 totally orthogonal methods.

Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of any past or present employer

------------------------------------------------------------------------------
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to