QB64 Phoenix Edition
Operator MOD - Printable Version

+- QB64 Phoenix Edition (https://staging.qb64phoenix.com)
+-- Forum: Chatting and Socializing (https://staging.qb64phoenix.com/forumdisplay.php?fid=11)
+--- Forum: General Discussion (https://staging.qb64phoenix.com/forumdisplay.php?fid=2)
+--- Thread: Operator MOD (/showthread.php?tid=1195)

Pages: 1 2 3 4 5 6 7 8


RE: Operator MOD - Kernelpanic - 12-03-2022

(12-03-2022, 05:57 PM)DSMan195276 Wrote:
(12-03-2022, 05:20 PM)Kernelpanic Wrote: In Octave too! Is this a bug in two math programs?  Huh
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>

In Octave the
\
operators does left division, basically dividing the thing on the right by the thing on the left. So
1.4 \ 1
is the same as
1 / 1.4
.

This is the explanation for the result. In Julia too. Thanks!