Post Reply 
Programming the INT and FRAC functions
01-04-2016, 07:34 PM (This post was last modified: 01-04-2016 07:56 PM by Dieter.)
Post: #11
RE: Programming the INT and FRAC functions
(01-04-2016 05:21 PM)Marcus von Cube Wrote:  
(01-04-2016 04:41 PM)Didier Lachieze Wrote:  
Code:
g H.MS g H.MS ...

What is the reasoning behind this sequence?

The first →H.MS reduces the fractional part to less than 0,6 and after the second →H.MS it's below 0,36. This way the rounding procedure always rounds down to the next lower integer. You could just as well use [.] [5] [–], but [→H.MS] [→H.MS] is one step shorter. ;-)

BTW, this method still is not perfect. It works up to x = 8E+9.

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Programming the INT and FRAC functions - Dieter - 01-04-2016 07:34 PM



User(s) browsing this thread: 1 Guest(s)