search for: do_arith

Displaying 1 result from an estimated 1 matches for "do_arith".

2017 May 24
1
precision of do_arith() in arithmetic.c
...just reported an error on the wilcox.test() function, and suggesting that an error may arise from abs() and rank(). I just had a quick check that the problem may come from the precision of the results of arithmetic functions. 87.7-89.1+1.4 # > 87.7-89.1+1.4 # [1] 8.437695e-15 I checked that do_arith() in arithmetic.c is using double type (8 byte) for PLUSOP, MINUSOP, TIMESOP, DIVOP etc. https://github.com/wch/r-source/blob/f68b30e3b5479d84adbff516d48d4722a574dc82/src/main/arithmetic.c I have two thoughts: (1) in the rank() function, we may round at less than 14 decimal places by default?...