Python Forum
smallest float that can increment a given value
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
smallest float that can increment a given value
#7
(Dec-11-2021, 06:35 PM)snippsat Wrote:
(Dec-11-2021, 06:05 PM)Skaperen Wrote: what would you pick for a name?
There is hint in his post,as he already has chosen names in gmpy2.
Also hi is the author🔨 of gmpy2.
(Dec-11-2021, 05:32 AM)casevh Wrote: gmpy2 uses the names next_above and next_below
I just used the same names as chosen by the MPFR library.

If I were to name a function that returns the increment (instead of functions that calculate the next, I would probably define it as float_increment(x, n) where x is the float and n is an integer specifying the direction (positive implies towards +Infinity and negative implies to -Infinity) and abs(n) specifies the number of steps to take.
Reply


Messages In This Thread
RE: smallest float that can increment a given value - by casevh - Dec-11-2021, 10:22 PM

Forum Jump:

User Panel Messages

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