Raised This Month: $ Target: $400
 0% 

Float precision


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
adska
Junior Member
Join Date: Jul 2018
Old 08-14-2018 , 02:20   Float precision
Reply With Quote #1

Hello, I am using float type variable to save number like 0.01, but when i print it to chat then number is shown as 0.099999. also it is not only print problem, if i make mathematical action between float variables (not very high precision, ex 5 digits after comma) precision of result is lost. why? how to fix it?

Last edited by adska; 08-14-2018 at 02:20.
adska is offline
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:41.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode