ok 1 - machine epsilon is same as ULP(1) # eps => 2.22044604925031308e-16 # ulp(1) => 2.22044604925031308e-16 ok 2 - machine epsilon is not same as ULP(2) # ulp(2) => 4.44089209850062616e-16 ok 3 - machine epsilon scaled by 2 is actually the same as ULP(2) # 2*eps => 4.44089209850062616e-16 ok 4 - machine epsilon is _not_ scaled by 2.1 to give the same as ULP(2) # 2.1*eps => 4.66293670342565767e-16 # ulp(2.1) => 4.44089209850062616e-16 ok 5 - machine epsilon is not the same as ULP(1/10) # ulp(1/10) => 1.38777878078144568e-17 # using machine epsilon does not give the results you seem to think ok 6 - 1 million single steps is not the same as removing one million times the step-value # x => -1.33288113454699264e-06 # diff => 0.00000000000000000e+00 ok 7 # sectokia => -1.33288113410290343e-06 # stringify sectokia = -1.3328811341029e-06 # in case you don't believe mine is equivalent: # loop 0: # x = 8.00000000000000044e-01 = '0.8', # sectokia = 8.00000000000000488e-01 = '0.8', # diff = 8.00000000000000044e-01 = '0.8' # loop 1: # x = 7.90000000000000036e-01 = '0.79', # sectokia = 7.90000000000000480e-01 = '0.79', # diff = 7.90000000000000036e-01 = '0.79' # loop 2: # x = 7.80000000000000027e-01 = '0.78', # sectokia = 7.80000000000000471e-01 = '0.78', # diff = 7.80000000000000027e-01 = '0.78' # loop 3: # x = 7.70000000000000018e-01 = '0.77', # sectokia = 7.70000000000000462e-01 = '0.77', # diff = 7.70000000000000018e-01 = '0.77' # loop 4: # x = 7.60000000000000009e-01 = '0.76', # sectokia = 7.60000000000000453e-01 = '0.76', # diff = 7.60000000000000009e-01 = '0.76' # loop 5: # x = 7.50000000000000000e-01 = '0.75', # sectokia = 7.50000000000000444e-01 = '0.75', # diff = 7.50000000000000000e-01 = '0.75' # loop 6: # x = 7.39999999999999991e-01 = '0.74', # sectokia = 7.40000000000000435e-01 = '0.74', # diff = 7.39999999999999991e-01 = '0.74' # loop 7: # x = 7.29999999999999982e-01 = '0.73', # sectokia = 7.30000000000000426e-01 = '0.73', # diff = 7.29999999999999982e-01 = '0.73' # loop 8: # x = 7.19999999999999973e-01 = '0.72', # sectokia = 7.20000000000000417e-01 = '0.72', # diff = 7.20000000000000084e-01 = '0.72' # loop 9: # x = 7.09999999999999964e-01 = '0.71', # sectokia = 7.10000000000000409e-01 = '0.71', # diff = 7.10000000000000075e-01 = '0.71' # loop 70: # x = 9.99999999999994643e-02 = '0.0999999999999995', # sectokia = 9.99999999999999084e-02 = '0.0999999999999999', # diff = 9.99999999999999778e-02 = '0.1' # mismatch ends loop at 70 # 1..7