Post Reply 
(32S) Floor Function
06-30-2017, 07:05 AM
Post: #3
RE: (32S) Floor Function
Doesn't work for -0.999999999999 (-1 + 1e-12), or in general for
-9.9999999999x Eyyy, x=5..9, yyy>=-1
(both the 32S and 42S versions, BTW)

The easiest way without stack preservation is

Code:
>LBL "FLOOR"
  RCL ST X  (or ENTER X<>Y)
  1
  MOD
  -
  END

I don't have a 32S so I don't know what commands are available there.
For the 41/42S, one version with stack preservation is as follows:

Code:
>LBL"FLOOR"
 IP
 X<>Y
 X<> ST L
 X<Y?
 DSE ST Y        always skips
>LBL 00
 X<> ST L
 X<>Y
 END

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(32S) Floor Function - Gerald H - 06-03-2017, 07:47 AM
RE: (32S) Floor Function - c785 - 06-29-2017, 04:02 PM
RE: (32S) Floor Function - Werner - 06-30-2017 07:05 AM
RE: (32S) Floor Function - c785 - 06-30-2017, 07:23 AM
RE: (32S) Floor Function - Werner - 06-30-2017, 08:51 AM
RE: (32S) Floor Function - c785 - 06-30-2017, 11:31 AM
RE: (32S) Floor Function - c785 - 06-30-2017, 02:58 PM
RE: (32S) Floor Function - Werner - 07-01-2017, 10:16 AM
RE: (32S) Floor Function - c785 - 07-02-2017, 09:29 AM
RE: (32S) Floor Function - Werner - 07-02-2017, 10:18 AM



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