CoWeb

find:
goto:
home

history
links from
printable

login
















Fractions Script
Webb - all rights reserved - ©2004
spacer
Author - Noe Ramos/Jean-Pieter Cornet
Email: nramos@geocities.com
Webpage:

Summary: Fractions for RPN

Instructions:

Code:

RPN.1.e \ Fractions
[c] Cm xbxaxc;
[d] ?4 wXdwXcwXbwXa;
[m] ?2 wXawXb xaXcxbXd {xdxc% Vv(xcXdvXc:B)};
[r] Cm xbxc/xaxc/;
[p]?1g1V1|(D'Illegal precision.\Precision must be between\1
and 18'.)vXe;
[v]?1g1Xdg1Xc1Xa1Xb
xe3*VProcessScript(tmp)

tmp = {
fg10xe=@(d1B)
tg1xa*g1Xa
1H+wg1Xbg1xd*1H+wg1Xcr2/
xdxe=@(d1B)_v
}xcxb;
"Fractions"
"Fractions"D'Fractions\by Noe Ramos\and Jan-Pieter Cornet'V;
~
"+: Enter a, b, c, d, press [+]\a/b + c/d" Cd xaxd*xbxc*+xbxd* Cr;
"-: Enter a, b, c, d, press [-]\a/b - c/d" Cd xaxd*xbxc*-xbxd* Cr;
"x: Enter a, b, c, d, press [x]\(a/b)(c/d)" Cd xaxc*xbxd* Cr;
": Enter a, b, c, d, press []\(a/b)/(c/d)" Cd xaxd*xbxc* Cr;
~
"mcm: Max. common mult.\Enter a, b, press [mcm]\a/b = cm/dm = a/b,m" Cc;
"red: Reduce a/b\Enter a, b, press [red]\a/b = cm/dm = c/d" Cr;
"prec: Set precision for conversion as 10^-X" Cp;
~
"inv: Inverse of a/b\Enter a, b, press [inv]\a/b[inv]=b/a" ?2 k2;
"clr: Clear last fraction" d1d1;
"conv: Convert to fraction" Cv;



0.0004 secs

top of page

Webb - all rights reserved - ©2004
powered by Spinneret 0.10