[mochikit] Re: twoDigitFloat bug

2007-10-09 Thread Pedro Belo

Great, thanks Bob.

On Oct 8, 10:41 pm, Bob Ippolito [EMAIL PROTECTED] wrote:
 That's how floats work, 568.80 is represented internally as (roughly)
 567.7999. numberFormatter rounds though, you can use
 numberFormatter(#.##)(568.80) which should give you what you want.

 On 10/8/07, Pedro Belo [EMAIL PROTECTED] wrote:



  Hey guys,

  I'm running into something that looks like a floating point problem,
  but I'm not sure about what can be done about it.

  The thing is: twoDigitFloat(568.80) returns 568.79. Just tested
  against the trunk, too.

  I've created a ticket in case anyone comes with a solution:
 http://trac.mochikit.com/ticket/275

  Thanks,
  Pedro


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
MochiKit group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~--~~~~--~~--~--~---



[mochikit] Re: twoDigitFloat bug

2007-10-08 Thread Bob Ippolito

That's how floats work, 568.80 is represented internally as (roughly)
567.7999. numberFormatter rounds though, you can use
numberFormatter(#.##)(568.80) which should give you what you want.

On 10/8/07, Pedro Belo [EMAIL PROTECTED] wrote:

 Hey guys,

 I'm running into something that looks like a floating point problem,
 but I'm not sure about what can be done about it.

 The thing is: twoDigitFloat(568.80) returns 568.79. Just tested
 against the trunk, too.

 I've created a ticket in case anyone comes with a solution:
 http://trac.mochikit.com/ticket/275

 Thanks,
 Pedro


 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
MochiKit group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~--~~~~--~~--~--~---