On Fri, May 24, 2013 at 4:14 PM, Mark Hahn <m...@hahnca.com> wrote: > > Try this in node: 1.03 - 0.42. > > It gives the correct answer after rounding. Also, integers certainly > can't do that. What is your point? >
My point was simply that saying that floating point numbers are "as precise as integers up to 50 bits" is incorrect and misleading. Pocket change money values can result in incorrect calculations if using floating point. > > If you're keeping the units in pennies then you're not using floating > point anyway. > > Right. The floating point in js provides integer support. For money use > floating point as integers. > > You can do anything in js you can do with integers up to 50 bits of > precision. JS is in no way inferior for money apps which is what you > claimed. > No I'm not the OP - I never claimed that. Doing it as integers/pennies is the right thing to do though. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.