diff --git a/doc/en/Authoring/Inputs/index.md b/doc/en/Authoring/Inputs/index.md index 1dec0f8476..710627e35c 100644 --- a/doc/en/Authoring/Inputs/index.md +++ b/doc/en/Authoring/Inputs/index.md @@ -106,6 +106,7 @@ If you wish to forbid commas, then escape it with a backslash. There are groups of common keywords which you can forbid simply as * `[[BASIC-ALGEBRA]]` common algebraic operations such as `simplify`, `factor`, `expand`, `solve`, etc. +* `[[BASIC-TRIG]]` names of all the trig and hyperbolic trig functions and their inverses, e.g. `sin`, `asin`, `sinh`, `asinh`, etc. * `[[BASIC-CALCULUS]]` common calculus operations such as `int`, `diff`, `taylor`, etc. * `[[BASIC-MATRIX]]` common matrix operations such as `transpose`, `invert`, `charpoly`, etc. diff --git a/stack/cas/cassecurity.class.php b/stack/cas/cassecurity.class.php index 4bae6bec98..92d5410108 100644 --- a/stack/cas/cassecurity.class.php +++ b/stack/cas/cassecurity.class.php @@ -73,6 +73,13 @@ class stack_cas_security { 'trigrat' => true, 'trigreduce' => true, 'trigsign' => true, 'trigsimp' => true, 'truncate' => true, 'decimalplaces' => true, 'simplify' => true, ], + '[[basic-trig]]' => [ + 'sin' => true, 'cos' => true, 'tan' => true, 'sec' => true, 'csc' => true, 'cot' => true, + 'asin' => true, 'acos' => true, 'atan' => true, 'asec' => true, 'acsc' => true, 'acot' => true, + 'atan2' => true, + 'sinh' => true, 'cosh' => true, 'tanh' => true, 'sech' => true, 'csch' => true, 'coth' => true, + 'asinh' => true, 'acosh' => true, 'atanh' => true, 'asech' => true, 'acsch' => true, 'acoth' => true, + ], '[[basic-calculus]]' => [ 'defint' => true, 'diff' => true, 'int' => true, 'integrate' => true, 'limit' => true, 'partial' => true, 'desolve' => true, 'express' => true, 'taylor' => true, diff --git a/tests/ast_container_test.php b/tests/ast_container_test.php index fe2bbf1f49..db73f7e55f 100644 --- a/tests/ast_container_test.php +++ b/tests/ast_container_test.php @@ -324,6 +324,7 @@ public function test_check_external_forbidden_words_literal(): void { ['[x,y,z]', 'b,\,,c', false], ['diff(x^2,x)', '[[BASIC-CALCULUS]]', false], // From lists. ['solve((x-6)^4,x)', '[[BASIC-ALGEBRA]]', false], // From lists. + ['sin(A-B)', '[[BASIC-TRIG]]', false], // From lists. ]; foreach ($cases as $case) {