Added out of domain checks
This commit is contained in:
parent
b2e2b91f2c
commit
b402f32e68
|
|
@ -1003,11 +1003,13 @@ Boolean builtin_abs(InterpreterState *interpreter_state) {
|
||||||
|
|
||||||
Boolean builtin_acos(InterpreterState *interpreter_state) {
|
Boolean builtin_acos(InterpreterState *interpreter_state) {
|
||||||
NUMERIC_TYPE;
|
NUMERIC_TYPE;
|
||||||
|
if (af < -1 || af > 1) return FALSE;
|
||||||
FLOAT_FUNCTION(acos);
|
FLOAT_FUNCTION(acos);
|
||||||
}
|
}
|
||||||
|
|
||||||
Boolean builtin_asin(InterpreterState *interpreter_state) {
|
Boolean builtin_asin(InterpreterState *interpreter_state) {
|
||||||
NUMERIC_TYPE;
|
NUMERIC_TYPE;
|
||||||
|
if (af < -1 || af > 1) return FALSE;
|
||||||
FLOAT_FUNCTION(asin);
|
FLOAT_FUNCTION(asin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1105,11 +1107,13 @@ Boolean builtin_lambda(InterpreterState *interpreter_state) {
|
||||||
|
|
||||||
Boolean builtin_ln(InterpreterState *interpreter_state) {
|
Boolean builtin_ln(InterpreterState *interpreter_state) {
|
||||||
NUMERIC_TYPE;
|
NUMERIC_TYPE;
|
||||||
|
if (af <= 0) return FALSE;
|
||||||
FLOAT_FUNCTION(log);
|
FLOAT_FUNCTION(log);
|
||||||
}
|
}
|
||||||
|
|
||||||
Boolean builtin_log(InterpreterState *interpreter_state) {
|
Boolean builtin_log(InterpreterState *interpreter_state) {
|
||||||
NUMERIC_TYPE;
|
NUMERIC_TYPE;
|
||||||
|
if (af <= 0) return FALSE;
|
||||||
FLOAT_FUNCTION(log10);
|
FLOAT_FUNCTION(log10);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1190,6 +1194,7 @@ Boolean builtin_sin(InterpreterState *interpreter_state) {
|
||||||
|
|
||||||
Boolean builtin_sqrt(InterpreterState *interpreter_state) {
|
Boolean builtin_sqrt(InterpreterState *interpreter_state) {
|
||||||
NUMERIC_TYPE;
|
NUMERIC_TYPE;
|
||||||
|
if (af < 0) return FALSE;
|
||||||
FLOAT_FUNCTION(sqrt);
|
FLOAT_FUNCTION(sqrt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue