in reply to Re^7: [OT: JavaScript] JS remainder operation ('%')
in thread [OT: JavaScript] JS remainder operation ('%')

> Choroba didn't tell us if C has the same output too

Well, it kind of has, but it's a bit tricky as you have to explicitly use printf.

#include <stdio.h> int main(int argc, char** argv) { printf("%f\n", 1.4/10); printf("%.17f\n", 1.4/10); return 0; }
Output:
0.140000 0.13999999999999999

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^9: [OT: JavaScript] JS remainder operation ('%')
by LanX (Saint) on Jan 19, 2024 at 17:32 UTC