Testing Mr$ for adding and showDP for only 12 places of sum, using the StringMath 2025-04-01.bm
This illustrates how you can use Double Type to convert numbers calc'd in QB64 to String Math for higher precision stuff.
Which is a question that came up recently in PM.
Code: (Select All)
_Title "StringMath 2025-04-01 test 1 add" ' b+ 2025-04-01
$Console:Only
Width 125
Randomize Timer
Dim As Double a, b
a = .00000000001919
b = .00000000009191
'a+b.00000000011110 check 9 0's and 4 1's
Print a, b
Print "a + b = "; showDP(mr$(N2S$(Str$(a)), "+", N2S$(Str$(b))), 12) ' show only 12 DP
'$Include: 'StringMath 2025-04-01.bm'
This illustrates how you can use Double Type to convert numbers calc'd in QB64 to String Math for higher precision stuff.
Which is a question that came up recently in PM.
b = b + ...