11-05-2022, 09:56 PM
According to the description: Abs is often used, for example in approximation algorithms, where it is important to stop the calculation above a certain level of accuracy. It doesn't matter whether the calculated value is larger or smaller than the comparison value.
Code: (Select All)
Dim As Double a, c, d
Dim b As Single
a = .12345678
Print a
b = Abs(a * 10000000)
Print a; b
Print
c = Abs(a * 10000000)
Print c
Print
c = .12345678
d = Abs(c * 10000000)
Print "c = ";: Print c
Print "d = ";: Print d