## avoid_zero
g3_eval(quote( c( avoid_zero(0), avoid_zero(10) ) ))
g3_eval(quote( avoid_zero(0:5) ))
## bounded / bounded_vec
curve(g3_eval(quote( bounded(x, 200, 100) ), x = x), -100, 100)
## logspace_add
curve(g3_eval(quote( logspace_add(x, 10) ), x = x), 0, 40)
## normalize_vec
g3_eval(quote( normalize_vec(c( 4, 4, 8, 2 )) ))
## nonconform_mult
g3_eval(quote( nonconform_mult(
array(seq(0, 4*5*6), dim = c(4,5,6)),
c(1e1, 1e2, 1e3, 1e4)) ))
## nonconform_div_avz
g3_eval(quote( nonconform_div_avz(
array(seq(0, 4*5*6), dim = c(4,5,6)),
c(1e1, 1e2, 0, 1e4)) ))
g3_eval(quote( nonconform_div(
array(seq(0, 4*5*6), dim = c(4,5,6)),
avoid_zero(c(1e1, 1e2, 0, 1e4))) ))
Run the code above in your browser using DataLab