One Hat Cyber Team
Your IP :
216.73.216.80
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
Macaulay2
/
OpenMath
/
cds
/
Edit File:
integer2.m2
-- todo: , ord -- done: class, euler, divides, eqmod, neqmod, modulo_relation eulerphi := n -> value(apply(factor n, i-> (i#0-1)*((i#0)^(i#1-1)))) ord := (p,n) -> ( c := 0; while (0 == (n % p)) do ( c = c + 1; n = n // p; ); c ) OMSEvaluators#"integer2" = new MutableHashTable; OMSEvaluators#"integer2"#"euler" = (args, attrs) -> ( a := apply(args, fromOpenMath); eulerphi(a#0) ) OMSEvaluators#"integer2"#"divides" = (args, attrs) -> ( a := apply(args, fromOpenMath); 0 == (a#1) % (a#0) ) OMSEvaluators#"integer2"#"eqmod" = (args, attrs) -> ( a := apply(args, fromOpenMath); mod(a#0, a#2) == mod(a#1, a#2) ) OMSEvaluators#"integer2"#"neqmod" = (args, attrs) -> ( a := apply(args, fromOpenMath); mod(a#0, a#2) != mod(a#1, a#2) ) OMSEvaluators#"integer2"#"class" = (args, attrs) -> ( a := apply(args, fromOpenMath); mod(a#0, a#1) ) OMSEvaluators#"integer2"#"modulo_relation" = (args, attrs) -> ( -- This symbol represents a univariate function, whose argument should be an integer. -- When applied to an integer m, it denotes the equivalence relation of being -- equal modulo m on Z. a := apply(args, fromOpenMath); m := a#0; (x,y) -> (mod(x, m) == mod(y,m)) ) OMSEvaluators#"integer2"#"ord" = (args, attrs) -> ( -- This symbol denotes a binary function. Its first argument should be a prime -- number p, the second an integer n. -- When applied to p and n, it represents the highest power of p occurring in a -- factorization of n. a := apply(args, fromOpenMath); p := a#0; n := a#1; ord(p,n) )
Simpan