Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
squirreltown
Roku Guru

Re: Str(value as Float) as String sometimes inaccurate!

Rek-thank you, must have been a squirrel !! when I was reading that part of the docs.
Mark - ignoring the "about" in your statement, does that mean that 1000000.5 is the same as 1000000?
So it's 7 total digits, regardless of which side of the decimal?
Kinetics Screensavers
0 Kudos
belltown
Roku Guru

Re: Str(value as Float) as String sometimes inaccurate!

"squirreltown" wrote:
Rek-thank you, must have been a squirrel !! when I was reading that part of the docs.
Mark - ignoring the "about" in your statement, does that mean that 1000000.5 is the same as 1000000?
So it's 7 total digits, regardless of which side of the decimal?

That's generally how floating-point numbers work; it doesn't matter where the decimal point is.

And "about" means "about". If you want an explanation (and a large squirrel-headache) for the underlying reason why it's "about" and not "exactly", then read these:
http://en.wikipedia.org/wiki/Floating_point
http://en.wikipedia.org/wiki/Single-precision_floating-point_format
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.