rounding numbers and precision

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Metonym.

Hello.

I have another two questions:

Code: Select all

OpenConsole()
zahl.f = 3.19098755
zahl$ = StrF(zahl)
PrintN(zahl$)
Delay(2500)
 
If I start this little program it prints:

3.190988

1. Can I prevent this?
2. Is there a way to calculate with a higher precision?

Hans-Jürgen