transcendental: Elementary transcendental functions

Description Usage Arguments Details Author(s) Examples

Description

Elementary transcendental functions: exponential and trig

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## 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)

Arguments

x

An onionic vector

base

In log(), the base of the logarithm

Details

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.

Author(s)

Robin K. S. Hankin

Examples

1
2
3
4
5
6
7
8
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)

onion documentation built on July 11, 2017, 9:04 a.m.