(12C) Decimal to Fraction
|
08-09-2018, 09:42 AM
Post: #32
|
|||
|
|||
RE: (12C) Decimal to Fraction
(08-09-2018 09:27 AM)Dieter Wrote: Then I wonder how exactly this Python diff() command works. Its arguments here are just the decimal input and a denominator – but not the corresponding numerator. So how does this work in detail? I assume that this is just the same function that I used: Code: def diff(f, d): Quote:For instance, what is the value for diff(pi, 106) and diff(pi, 113)? >>> from math import pi >>> diff(pi, 106) 8.32196275291075e-05 >>> diff(pi, 113) 2.667641894049666e-07 HTH Thomas |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)