RobinHankin / clifford

https://robinhankin.github.io/clifford/
5 stars 0 forks source link

const() #82

Closed RobinHankin closed 1 year ago

RobinHankin commented 1 year ago

Look at this snippet from inst/dual_numbers_clifford.Rmd:

> getim <- function(x){x-const(x)}  # should be a builtin -- I'm working on it
> my_sin <- function(x){sin(const(x)) + cos(const(x))*getim(x)}
> my_sin(1 + e(1))
Element of a Clifford algebra, equal to
+ 0.841471 + 0.5403023e_1
> my_sin(1)
Error in x[[2]] : subscript out of bounds