exp                  package:onion                  R Documentation

_E_l_e_m_e_n_t_a_r_y _t_r_a_n_s_c_e_n_d_e_n_t_a_l _f_u_n_c_t_i_o_n_s

_D_e_s_c_r_i_p_t_i_o_n:

     Elementary transcendental functions: exponential and trig

_U_s_a_g_e:

     ## S3 method for class 'onion':
     exp(x)
     ## S3 method for class 'onion':
     log(x,base=exp(1))
     ## S3 method for class 'onion':
     sin(x)
     ## S3 method for class 'onion':
     cos(x)
     ## S3 method for class 'onion':
     tan(x)
     ## S3 method for class 'onion':
     asin(x)
     ## S3 method for class 'onion':
     acos(x)
     ## S3 method for class 'onion':
     atan(x)
     ## S3 method for class 'onion':
     sinh(x)
     ## S3 method for class 'onion':
     cosh(x)
     ## S3 method for class 'onion':
     tanh(x)
     ## S3 method for class 'onion':
     asinh(x)
     ## S3 method for class 'onion':
     acosh(x)
     ## S3 method for class 'onion':
     atanh(x)
     ## S3 method for class 'onion':
     sqrt(x)

_A_r_g_u_m_e_n_t_s:

       x: An onionic vector

    base: In 'log()', the base of the logarithm

_D_e_t_a_i_l_s:

     Trig and exponential functions, and a square root.  *Warning:*
     these functions do not obey all the identities that one might
     expect; quaternions are not commutative, and octonions are not
     associative. The examples section illustrates this.

_A_u_t_h_o_r(_s):

     Robin K. S. Hankin

_E_x_a_m_p_l_e_s:

     x <- roct(3)/10
     sin(x)^2 + cos(x)^2  #should be close to O1

     a <- rquat(5)
     b <- roct(5)

     log(a*b) -log(a) -log(b)  #zero for real or complex a & b, but not quaternions
     log(b*a) -log(a) -log(b)  #different (and still nonzero)

