◄Example► ◄Contents► ◄Index► ◄Back► ────────────────────────────────────────────────────────────────────────────── ' This example use the CSNG and CDBL functions to demonstrate how floating- ' point precision can be lost when a double-precision number is converted ' to single precision. ' To try this example: ' 1. Choose New Project from the file menu ' 2. Copy the code example below to the code window ' 3. Press F5 to run the example CLS ' Clear the screen d# = 7# / 9# PRINT "d# originally = "; TAB(40); d# s! = CSNG(d#) ' Convert double (d#) to single (s!) PRINT "s! assigned value from d#, now = "; TAB(40); s! d# = CDBL(s!) ' Convert single (s!) back to double (d#) PRINT "d# assigned value back from s!, now = "; TAB(40); d#