12-03-2022, 05:20 PM
(This post was last modified: 12-03-2022, 05:31 PM by Kernelpanic.)
(12-03-2022, 05:12 PM)Pete Wrote:(12-03-2022, 05:07 PM)Kernelpanic Wrote: In Julia, the first result is also a bit peculiar. How do one get 0.666?
Try worshiping Satan. Hey, it worked for the crew who created FreeBASIC.
Pete
Something for hard math freaks!

Code: (Select All)
julia> 1.4 \ 1
0.7142857142857143
In Octave too! Is this a bug in two math programs?

Code: (Select All)
octave:1> 1.5 \ 1
ans = 0.6667
octave:2> 1.4 \ 1
ans = 0.7143
octave:3> mod(1.4, 1)
ans = 0.4000
octave:4> 1.4 / 1
ans = 1.4000
octave:5>