User`s manual

4-22
Assigning Double-Precision Values
Here are three ways to be sure double-precision values are stored without
any trailing "garbage digits". The first two (lines 10 and 20) are for entering
constants (either in assignment statements or via INPUT responses); the
third (line 30) is for converting from singleprecision to double-precision
values.
10 A#=0.1D0
20 B#=0.1000000
30 C#=VAL(STR$(0.1))
40 PRINT A#,B#,C#
RUN
.1 .1 .1
Line 30 forces BASIC to take a single-precision value (in this case, the
constant 0.1 – but you could. use any variable), convert it to a string
representation, and then re-interpret this string as a doubleprecision value.