Post Reply 
Programming the INT and FRAC functions
01-05-2016, 07:19 AM
Post: #14
RE: Programming the INT and FRAC functions
(01-05-2016 06:52 AM)Dieter Wrote:  
(01-04-2016 07:45 PM)Didier Lachieze Wrote:  On the HP-55 [→H.MS] [→H.MS] uses 4 steps (keystrokes are not merged) so it's one step longer, but it's better because [.] [5] [–] doesn't work with negative numbers.

It depends – you might just as well say that it works even better. ;-)
Using [.] [5] [–] yields a FLOOR function. This is the way "INT" is implemented in many computer languages: it returns the largest integer ≤ x.
This way also a CEIL function could be added, since ceil(x) = –floor(–x).

Dieter

Yes, FLOOR and CEIL are useful functions but in my mind they are different from INT and FRAC whose usage is to split numbers and get either the integer or the fractional part.
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 - Didier Lachieze - 01-05-2016 07:19 AM



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