Post Reply 
(42S) (& 41C): Ceiling (& Floor) Function Programme
05-15-2020, 11:59 PM
Post: #14
RE: (42S) (& 41C): Ceiling (& Floor) Function Programme
From all the programs, the one that uses the command MOD presented by Werner is the most interesting for me, if you replace 1 by -1 before the command MOD you get the CEIL function. This next modification requires that you enter a number and 1 if you want the FLOOR function or -1 if you want the CEIL function

00 { 12-Byte Prgm }
01 LBL “IFS”
02 RCL ST Y
03 X<>Y
04 MOD
05 -
06 END

Examples:

2.5 [ENTER] 1 [XEQ] [IFS] returns 2
2.5 [ENTER] -1 [XEQ] [IFS] returns 3
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (42S) (& 41C): Ceiling (& Floor) Function Programme - Juan14 - 05-15-2020 11:59 PM



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