onion (version 1.5-0)

Math: Various logarithmic and circular functions for onions

Description

Various elementary functions for onions

Usage

onion_log(x,base=exp(1))
onion_exp(x)
onion_sign(x)
onion_sqrt(x)
onion_cosh(x)
onion_sinh(x)
onion_acos(x)
onion_acosh(x)
onion_asin(x)
onion_asinh(x)
onion_atan(x)
onion_atanh(x)
onion_cos(x)
onion_sin(x)
onion_tan(x)
onion_tanh(x)
onion_cos(x)
onion_sin(x)
onion_tan(x)
onion_tanh(x)

Arguments

x

Object of class onion

base

In function log(), the base of the logarithm

Author

Robin K. S. Hankin

Details

Standard math stuff. I am not convinced that the trig functions (sin() etc) have any value.

Examples

Run this code
x <- roct()
exp(x+x) - exp(x)*exp(x) # zero to numerical precision

jj <- exp(log(x)/2)      # use sqrt() here
jj*jj-x                  #  also small


y <- roct()
exp(x+y) - exp(x)*exp(y) # some rules do not operate for onions



max(Mod(c(sin(asin(x))-x,asin(sin(x))-x)))   # zero to numerical precision



Run the code above in your browser using DataLab