3 ms·
agree. arithmetic in computer languages do not have a theoretical basis that matches the theory of arithmetic in standard algebra. for example, if a = 0.3 b=0.
by doubloon 3y ago
agree. arithmetic in computer languages do not have a theoretical basis that matches the theory of arithmetic in standard algebra. for example,
if a = 0.3 b=0.4 and c=5 as f32 in rust, then the following "well known results" from the article are all false:
(b) a+(b+c) = (a+b)+c is false
(d) a*(b+c) = a*b+a*c is false
(f) (ab)^c = a^c b^c is false
(g) a^b a^c = a^(b+c) is false
(h) (a^b)^c = a^(b*c) is false
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=7a34a46b242f2a12ecb89ae119115660 https://play.rust-lang.org/?version=stable&mode=debug&editio...