#8896: 0.0000000000000000000000000000 is parsed completely differently than
1.0000000000000000000000000000 for no good reason
--------------------------------+-------------------------------------------
   Reporter:  was               |          Owner:  AlexGhitza     
       Type:  defect            |         Status:  needs_info     
   Priority:  minor             |      Milestone:  sage-4.7.1     
  Component:  basic arithmetic  |       Keywords:                 
Work_issues:                    |       Upstream:  N/A            
   Reviewer:  Mariah Lenox      |         Author:  Robert Bradshaw
     Merged:                    |   Dependencies:                 
--------------------------------+-------------------------------------------

Comment(by jdemeyer):

 Replying to [comment:26 robertwb]:
 > Replying to [comment:25 jdemeyer]:
 > > In my opinion, this ticket is a huge can of worms and a bad idea.  I
 don't see any mathematically consistent reason who 0.0 '''should''' be
 treated differently than 0.0000000000000.
 >
 > It's exactly the same reason that 1.0 is treated differently than
 1.0000000000000000000000. The (value-preserving) trailing zeros indicate
 higher precision.
 It is absolutely ''not the same'' because with non-zero numbers only
 digits '''after''' a non-zero digit contribute to the precision.  Indeed,
 `0.437` and `0.00000000000437` have exactly the same precision.

 > Because otherwise there's now way to write a high-precision zero (in
 fact I can't think of any other interpretation of a large number of
 trailing zeros).
 Well, you can always do:
 {{{
 sage: zero = RealField(1000)(0)
 sage: zero.prec()
 1000
 }}}

 An other way to demonstrate the problem with this patch is that truncating
 decimal numbers (i.e. removing digits from the right) can ''increase'' the
 precision, which is very unlogical::
 {{{
 sage: (0.000000000000000000001234567890123456789).prec()
 67
 sage: (0.00000000000000000000123456789012345678).prec()
 64
 sage: (0.000000000000000000001).prec()
 53
 sage: (0.00000000000000000000).prec()
 74
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8896#comment:28>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to