0 Members and 2 Guests are viewing this topic.
TI-OS z80float dif %ln = 131547.46cc ~165000 +33452.54 125.43% much slower :(atan = 173317.82cc ~174000 +682.18 100.39% slightly sloweratanh = 175320.91cc ~174000 -1320.91 99.25% slightly fastersqrt = 77699.51cc 6540.79 -71158.72 8.42% Way faster!mul = 30229.53cc 9928.23 -20301.30 32.84% over 3 times fasteradd = 1737.99cc 2094.31 +356.32 120.50% slower :(
Basic arithmetic: absSingle |x| -> z Computes the absolute value addSingle x+y -> z ameanSingle (x+y)/2 -> z. Arithmetic mean of two numbers. cmpSingle cmp(x,y) Compare two numbers. Output is in the flags register! rsubSingle y-x -> z subSingle x-y -> z divSingle x/y -> z invSingle 1/x -> z mulSingle x*y -> z negSingle -x -> z sqrtSingle sqrt(x*y) -> z geomeanSingle sqrt(x*y) -> zLogs, Exponentials, Powers expSingle e^x -> z pow2Single 2^x -> z pow10Single 10^x-> z powSingle y^x -> z lgSingle log2(x) -> z lnSingle ln(x) -> z log10Single log10(x) -> z logSingle log_y(x) -> zTrig, Hyperbolic, and their Inverses acoshSingle acosh(x) -> z acosSingle acos(x) -> z asinhSingle asinh(x) -> z asinSingle asin(x) -> z atanhSingle atanh(x) -> z atanSingle atan(x) -> z coshSingle cosh(x) -> z cosSingle cos(x) -> z sinhSingle sinh(x) -> z sinSingle sin(x) -> z tanhSingle tanh(x) -> z tanSingle tan(x) -> zSpecial-Purpose Used by various internal functions, or optimized for special cases bg2iSingle 1/BG(x,y) -> z Fewer iterations, but enough to be suitable for ln(x). Kind of a special-purpose routine bgiSingle 1/BG(x,y) -> z More iterations, general-purpose, needed for the inverse trig and hyperbolics div255Single x/255 -> z div85Single x/85 -> z div51Single x/51 -> z div17Single x/17 -> z div15Single x/15 -> z div5Single x/5 -> z div3Single x/3 -> z mul10Single x*10 -> z mulSingle_p375 x*0.375 -> z Used in bg2iSingle. x*(3/8) mulSingle_p34375 x*0.34375-> z Used in bgiSingle. x*(11/32) mulSingle_p041015625 x*0.041015625-> z Used in bgiSingle. x*(21/512)Miscellaneous and Utility randSingle rand -> z single2str str(x) -> z Convert a single to a null-terminated string, with formatting single2TI tifloat(x) -> z Converts a single to a TI-float. Useful for interacting with the TI-OS ti2single single(tifloat x)->z Converts a TI-float to a single. Useful for interacting with the TI-OS single2char Honestly, I forgot what it does, but I use it in some string routines. probably converts to a uint8 pushpop pushes the main registers to the stack and sets up a routine so that when your code exits, it restores registers. Replaces manually surrounding code with push...pop
xcmp for comparing two numbersxneg -x -> zxabs |x|-> zxinv 1/x -> z Observed a bug in 1/pi !xpow x^y -> zxpow2 2^xxpow10 10^xxlog log_y(x) It's failing miserablyxlg log2(x)xlog10 log10(x) Observed a bug in log10(pi)