The Museum of HP Calculators

HP Forum Archive 17

 CEILING function substitute for 35sMessage #1 Posted by Martin Pinckney on 11 Sept 2007, 2:44 p.m. Does anyone know a set of functions that combined, will return the same result as the CEILING function (38G)? Will be used on the 35s. Thanks for any ideas.

 Re: CEILING function substitute for 35sMessage #2 Posted by Meenzer on 11 Sept 2007, 3:35 p.m.,in response to message #1 by Martin Pinckney For the FLOOR function: left shift-INTG-4 For the CEIL function: do the above and add 1 Edited: 11 Sept 2007, 3:36 p.m.

 Re: CEILING function substitute for 35sMessage #3 Posted by Paul Dale on 11 Sept 2007, 4:34 p.m.,in response to message #2 by Meenzer Quote:For the CEIL function: do the above and add 1 Which would be wrong when the argument is an exact integer. - Pauli

 Re: CEILING function substitute for 35sMessage #4 Posted by Eduardo Duenez on 11 Sept 2007, 4:21 p.m.,in response to message #2 by Meenzer Not really so! CEIL(x) is *equal* to FLOOR(x) if x is an integer! I don't have a 35s yet but CEIL(x) = -FLOOR(-x), so a solution is to write a short program executing NEG FLOOR NEG Eduardo

 Re: CEILING function substitute for 35sMessage #5 Posted by Meenzer on 12 Sept 2007, 12:44 a.m.,in response to message #4 by Eduardo Duenez Of course, the more enlightened posters above me are right! But with that neat NEG FLOOR NEG trick everything is provided for...;-)

Go back to the main exhibit hall