Opened 9 years ago

Closed 9 years ago

#12163 closed defect (duplicate)

Missing digits in numerical_approx

Reported by: slabbe Owned by: jason, jkantor
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: numerical Keywords:
Cc: Merged in:
Authors: Reviewers: Karl-Dieter Crisman
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


From this conversation on sage-devel :

Using n() sometimes returns the wrong number of digits

This is correct:

sage: a = n(golden_ratio, digits=5000)
sage: len(str(a))

This is not:

sage: a = n(golden_ratio, digits=5000000)
sage: len(str(a))

Any clue?

Jerome Tremblay

Change History (4)

comment:1 Changed 9 years ago by slabbe

This is related to (and maybe fixed by) #10164.

comment:2 Changed 9 years ago by kcrisman

  • Milestone changed from sage-4.8 to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

I think that this is in fact a dup of (or at any rate should be solved by the patch at) #10164 :) caused by the BDFL not reading all the posts in a thread carefully enough :) Presumably this fixes it.

By the way, the doctests at that ticket are themselves quite entertaining.

comment:3 Changed 9 years ago by kcrisman

  • Reviewers set to Karl-Dieter Crisman
  • Status changed from needs_review to positive_review

With #10164:

sage:  a = n(golden_ratio, digits=5000)
sage: len(str(a))
sage: a = n(golden_ratio, digits=5000000)
lsage: len(str(a))

So let's close as a dup.

comment:4 Changed 9 years ago by jdemeyer

  • Resolution set to duplicate
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.