#4250 NORM Never A: Calculate should use exact numbers when possible and displaying number should be more friendly.

Zarro Boogs per Child bugtracker at laptop.org
Wed Oct 17 07:04:58 EDT 2007


#4250: Calculate should use exact numbers when possible and displaying number
should be more friendly.
----------------------------------+-----------------------------------------
  Reporter:  ohshima              |       Owner:  rwh           
      Type:  defect               |      Status:  new           
  Priority:  normal               |   Milestone:  Never Assigned
 Component:  calculator-activity  |     Version:                
Resolution:                       |    Keywords:                
  Verified:  0                    |  
----------------------------------+-----------------------------------------

Comment(by rwh):

 Calculate formats large numbers in scientific notation ''on purpose'',
 simply to make things more readable. Of course I can increase the boundary
 somewhat (9 digits?). But I hope that children understanding the meaning
 of large numbers will learn the meaning of the scientific notation quickly
 as well. In the other direction (0.000000001) Calculate uses this
 formatting as well, for the same reason. I think, for example, that it's
 usually hard to see in a glance whether there are 5 or 6 zeros.

 bc is not that ideal; it doesn't support a lot of functions and would
 indeed require a lot of parsing of input and output. I started out with a
 setup like that, but I assure you it doesn't suit our needs.

 Now the factorial function is really not that complicated (implemented
 recursively). I agree that the answer to 2000!/1999! should be a nice
 integer. In principle everything is implemented with the python Decimal
 class where possible, so indeed this is a bug. I'll figure it out soon.

-- 
Ticket URL: <https://dev.laptop.org/ticket/4250#comment:3>
One Laptop Per Child <https://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list