version 1.39, 2004/03/08 08:24:42 |
version 1.42, 2004/09/10 13:20:22 |
|
|
%%%%%%%%%%% $OpenXM: OpenXM/src/kan96xx/Doc/ox.sm1,v 1.38 2004/03/04 05:18:26 takayama Exp $ |
%%%%%%%%%%% $OpenXM: OpenXM/src/kan96xx/Doc/ox.sm1,v 1.41 2004/08/28 05:23:55 takayama Exp $ |
|
|
/ox.sm1.myname (ox-new.sm1) def |
/ox.sm1.myname (ox-new.sm1) def |
|
|
Line 1053 oxasir.verbose { |
|
Line 1053 oxasir.verbose { |
|
|
|
f 0 get isPolynomial { |
f 0 get isPolynomial { |
/r f 0 get (ring) dc def |
/r f 0 get (ring) dc def |
/vvv vvv { r ,, } map def |
/vvv vvv { r __ } map def |
} |
} |
{ |
{ |
[vvv from_records ring_of_polynomials 0] define_ring |
[vvv from_records ring_of_polynomials 0] define_ring |
Line 1094 oxasir.verbose { |
|
Line 1094 oxasir.verbose { |
|
popVariables |
popVariables |
arg1 |
arg1 |
} def |
} def |
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
|
/polygcd { |
|
/arg1 set |
|
[/pp /f /g /comm /vv] pushVariables |
|
[(CurrentRingp)] pushEnv |
|
[ |
|
/pp arg1 def |
|
oxasir.ccc [ ] eq { |
|
(Starting ox_asir server.) message |
|
ox_asirConnectMethod |
|
} { } ifelse |
|
|
|
pp isArray { |
|
/f pp 0 get def |
|
/g pp 1 get def |
|
pp length 3 eq { |
|
/vv pp 2 get def |
|
vv isArray { /vv vv from_records def } { } ifelse |
|
[vv ring_of_polynomials 0] define_ring |
|
f . /f set |
|
g . /g set |
|
} { } ifelse |
|
}{ (usage: [f g] polygcd) error } ifelse |
|
oxasir.ccc [(gcd) f g] asir /arg1 set |
|
] pop |
|
popEnv |
|
popVariables |
|
arg1 |
|
} def |
|
[(polygcd) |
|
[( [f g] polygcd r ) |
|
( [f g v] polygcd r) |
|
(Example: [(x^2-1) (x-1) [(x)]] polygcd ) |
|
] |
|
] putUsages |
|
/polylcm { |
|
/arg1 set |
|
[/pp /f /g /comm /vv] pushVariables |
|
[(CurrentRingp)] pushEnv |
|
[ |
|
/pp arg1 def |
|
oxasir.ccc [ ] eq { |
|
(Starting ox_asir server.) message |
|
ox_asirConnectMethod |
|
} { } ifelse |
|
|
|
pp isArray { |
|
/f pp 0 get def |
|
/g pp 1 get def |
|
pp length 3 eq { |
|
/vv pp 2 get def |
|
vv isArray { /vv vv from_records def } { } ifelse |
|
[vv ring_of_polynomials 0] define_ring |
|
f . /f set |
|
g . /g set |
|
} { } ifelse |
|
}{ (usage: [f g] polylcm) error } ifelse |
|
oxasir.ccc [(lcm) f g] asir /arg1 set |
|
] pop |
|
popEnv |
|
popVariables |
|
arg1 |
|
} def |
|
[(polylcm) |
|
[( [f g] polylcm r ) |
|
( [f g v] polylcm r) |
|
(Example: [(x^2-1) (x-1) [(x)]] polylcm ) |
|
] |
|
] putUsages |
|
|
|
/asir_red { |
|
/arg1 set |
|
[/pp /f /g /rr /vv] pushVariables |
|
[(CurrentRingp)] pushEnv |
|
[ |
|
/pp arg1 def |
|
oxasir.ccc [ ] eq { |
|
(Starting ox_asir server.) message |
|
ox_asirConnectMethod |
|
} { } ifelse |
|
{ |
|
pp isRational { |
|
/f pp numerator def |
|
/g pp denominator def |
|
[[f g]] reduceByAsir /rr set |
|
}{ } ifelse |
|
exit |
|
|
|
pp isArray { |
|
/vv pp 2 get def |
|
/f pp 0 get 0 get def |
|
/g pp 0 get 1 get def |
|
[[f toString g toString] vv] reduceByAsir /rr set |
|
} { } ifelse |
|
exit |
|
|
|
(asir_red: not implemented) error exit |
|
} loop |
|
|
|
rr 1 get isPolynomial { |
|
rr 0 get rr 1 get div /rr set |
|
}{ |
|
rr 1 get (1).. eq { |
|
rr 0 get /rr set |
|
}{ |
|
rr 0 get rr 1 get div /rr set |
|
} ifelse |
|
} ifelse |
|
|
|
/arg1 rr def |
|
] pop |
|
popEnv |
|
popVariables |
|
arg1 |
|
} def |
|
[(asir_red) |
|
[(Calling the function red of asir. It simplifies a rational function.) |
|
(cf. cancel) |
|
(Example: (x^2). (x). div asir_red ) |
|
]] putUsages |
|
|
|
/asir_fctr { fctr } def |
|
[(asir_fctr) |
|
[(Calling the factorizer of asir.) |
|
]] putUsages |
|
|
|
/asir_primadec { primadec } def |
|
[(asir_primadec) |
|
[(Calling the primadec of asir.) |
|
]] putUsages |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
[(chattr) 0 /findIntegralRoots] extension pop |
[(chattr) 0 /findIntegralRoots] extension pop |