- or download this
sub f {$x=shift; return $x*0.1}
- or download this
(define (f x) (* x 0.1))
- or download this
function f(x) {return x*0.1}
- or download this
$ time rhino -e 'function f(x) {return x*0.1}; print(f(34))'
3.4000000000000004
...
real 0m0.240s
user 0m0.292s
sys 0m0.036s
- or download this
time echo "define f(x) {x*0.1}; print f(34)" | bc
3.4
...
real 0m0.002s
user 0m0.000s
sys 0m0.000s