qbs_str my mod
#8
let me give an example to illustrate the difference between converting double to 16 digits and 15 digits as implemented in the C code above
Code: (Select All)
Dim As Double x
For x = -1 To 1 Step .1#
    Print x
Next
output using unmodified QB64
Quote:-1
-.9
-.8
-.7000000000000001
-.6000000000000001
-.5000000000000001
-.4000000000000001
-.3000000000000002
-.2000000000000001
-.1000000000000001
-1.387778780781446D-16
9.999999999999987D-02
.2
.3
.4
.5
.6
.6999999999999998
.7999999999999998
.8999999999999998
.9999999999999998
output when using my modified qbs_str routine
Quote:-1
-.9
-.8
-.7
-.6
-.5
-.4
-.3
-.2
-.1
-1.38777878078145D-16
.0999999999999999
.2
.3
.4
.5
.6
.7
.8
.9
1
Reply


Messages In This Thread
qbs_str my mod - by Jack - 04-19-2022, 01:18 AM
RE: qbs_str my mod - by Pete - 04-19-2022, 02:16 AM
RE: qbs_str my mod - by Jack - 04-19-2022, 02:36 AM
RE: qbs_str my mod - by admin - 04-19-2022, 04:03 AM
RE: qbs_str my mod - by Jack - 04-19-2022, 03:57 PM
RE: qbs_str my mod - by Jack - 04-19-2022, 06:57 PM
RE: qbs_str my mod - by Jack - 04-19-2022, 10:21 PM
RE: qbs_str my mod - by Jack - 04-20-2022, 02:34 AM
RE: qbs_str my mod - by Jack - 04-20-2022, 03:08 PM
RE: qbs_str my mod - by admin - 04-20-2022, 03:22 PM



Users browsing this thread: 5 Guest(s)