[41,42] Perfect functions
|
05-13-2020, 01:07 PM
(This post was last modified: 05-14-2020 06:17 AM by Werner.)
Post: #1
|
|||
|
|||
[41,42] Perfect functions
A 'perfect' function is one that mimicks the built-in functions:
Here, I present a few routines that pass these requirements. 1. Parallel Resistance: In: X Y Out: X*Y/(X+Y) Code: 01 LBL"PAR" For the 42S, that can be shortened to: Code: 00 { 17-Byte Prgm } 2. CEIL and FLOOR Code: 01*LBL"CEIL" 3. combine two percentages 1+r%/100 = (1+x%/100)*(1+y%/100) -> r%=x% +y% + x%*y%/100 In: x% y% Out: r% Code: 01*LBL"%*" 4. SINC Sinc(x) = Sin(x)/x, or 1 if x=0 Code: 01 LBL"SINC" Do you have more? Cheers, Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
[41,42] Perfect functions - Werner - 05-13-2020 01:07 PM
RE: [41,42] Perfect functions - rprosperi - 05-13-2020, 03:32 PM
RE: [41,42] Perfect functions - Werner - 05-13-2020, 04:32 PM
RE: [41,42] Perfect functions - rprosperi - 05-13-2020, 10:31 PM
RE: [41,42] Perfect functions - Sylvain Cote - 05-13-2020, 11:02 PM
RE: [41,42] Perfect functions - rprosperi - 05-14-2020, 12:36 PM
RE: [41,42] Perfect functions - rprosperi - 05-13-2020, 11:49 PM
RE: [41,42] Perfect functions - Sylvain Cote - 05-14-2020, 05:30 AM
RE: [41,42] Perfect functions - Werner - 05-14-2020, 06:20 AM
|
User(s) browsing this thread: 5 Guest(s)