Python Forum
method float.as_integer_ratio() always ...
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
method float.as_integer_ratio() always ...
#1
method float.as_integer_ratio() always gives a power of two for the denominator of the ratio. it does not implement the algorithm to find the lowest integers that can give that ratio at that precision.

Output:
>>> (245850922/78256779).as_integer_ratio() (884279719003555, 281474976710656)
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
method float.as_integer_ratio() always ... - by Skaperen - Jun-28-2019, 08:40 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020