Adding asin
/ "configuration is invalid" error
#345
-
Hi sorry for the repeat questions, a bit new to this. I'm trying to add asin as a unary operator, I have the following:
And I'm getting the error
Should I be defining the unary operator like this?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You are almost there. Since I generally prefer (2) as the output equations won't have weird steps in them. You could do this: "my_asin(x) = abs(x) > 1 ? convert(typeof(x), NaN) : asin(x)" and then just give it the normal |
Beta Was this translation helpful? Give feedback.
You are almost there. Since
asin
is not valid forabs(x)>1
, you need to create a new operator that either (1) clips the input to be valid, or (2) returns a NaN for invalid input.I generally prefer (2) as the output equations won't have weird steps in them. You could do this:
"my_asin(x) = abs(x) > 1 ? convert(typeof(x), NaN) : asin(x)"
and then just give it the normal
sympy
definition by for"my_asin"
instead.