Skip to content

Instantly share code, notes, and snippets.

@tueda
Last active August 28, 2015 16:36
Show Gist options
  • Save tueda/5f83e562854158b5a62f to your computer and use it in GitHub Desktop.
Save tueda/5f83e562854158b5a62f to your computer and use it in GitHub Desktop.
#-
#include `NAME_' # time
Off stats;
CF num;
S ep,n1,...,n14;
L F1 =
+(n1)^3*(n4)^2*(n5)^11*(n6)^14*(n7)^6*(n8)^15*(n9)^12*(-
35184372088832)*(-1+n5)*(1+n9)*(5-11*n9+n9^2-13*n8+2*n8*n9+2*n8^2
-9*n7+3*n7*n9+3*n7*n8+2*n7^2+n6-14*n5+2*n5*n9+5*n5*n8+3*n5*n7+n5*
n6+2*n5^2-14*n4+5*n4*n9+7*n4*n8+6*n4*n7-2*n4*n6+5*n4*n5+6*n4^2+n3
*n9+2*n3*n8+3*n3*n7-6*n3*n4-4*n2+2*n2*n9+3*n2*n7+n2*n5+4*n2*n4+n2
*n3+n2^2+28*n1-n1*n9-4*n1*n8-8*n1*n7-3*n1*n5-6*n1*n4+2*n1*n3-4*n1
*n2-4*n1^2-36*ep+8*ep*n9+12*ep*n8+12*ep*n7+10*ep*n5+10*ep*n4+4*ep
*n3+8*ep*n2-8*ep*n1+16*ep^2)
;
L F2 =
+(n1)^5*(n2)^2*(n5)^4*(n6)^4*(n7)^7*(n8)^10*(n9)^21*(-8589934592)
*(-1+n5)^2*(1+n9)*(30-19*n9+2*n9^2-18*n8+2*n8*n9-64*n7+14*n7*n9+
16*n7*n8+12*n7^2-22*n6+4*n6*n9+4*n6*n8+8*n6*n7+4*n6^2+12*n5-2*n5*
n9+4*n5*n8-4*n5*n6-4*n5^2+20*n4-6*n4*n9+4*n4*n8-4*n4*n7-8*n4*n6+4
*n4^2-2*n3*n9+4*n3*n7+4*n3*n5-4*n3*n4-32*n2+8*n2*n9+2*n2*n8+22*n2
*n7+8*n2*n6-2*n2*n5-4*n2*n4+6*n2^2+6*n1+7*n1*n9+6*n1*n7+10*n1*n6-
6*n1*n5-12*n1*n4+4*n1*n2-2*n1^2-16*ep+8*ep*n9+8*ep*n8+32*ep*n7+8*
ep*n6-16*ep*n5-16*ep*n4+16*ep*n2)
;
.sort
L F = F1;
*L F = F2;
.sort
Hide;
.sort
** FactArg
#call resettime()
L G1 = num(F);
factarg num;
*P;
.sort
#call time(factarg)
Drop G1;
.sort
** #FactDollar
#call resettime()
#$G2 = F;
#factdollar $G2
#call time(#factdollar)
** FactDollar
#call resettime()
L G3 = 1;
$G3 = F;
factdollar $G3;
.sort
#call time(factdollar)
Drop G3;
.sort
** Factorize
#call resettime()
L G4 = F;
Factorize;
*P;
.sort
#call time(factorize)
Drop G4;
.sort
.end
*--#[ time :
#define oldt "0.0"
#procedure resettime()
#redefine oldt "`time_'"
#endprocedure
#procedure time(?message)
* UNIX only
#system echo ~~~`?message' : $(bc <<< `time_'-`oldt') sec
#redefine oldt "`time_'"
#endprocedure
#call resettime()
*--#] time :
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment