RosettaCodeData/Task/Variable-length-quantity/PARI-GP/variable-length-quantity.parigp
2023-07-01 13:44:08 -04:00

6 lines
196 B
Text

hex(s)=my(a=10,b=11,c=12,d=13,e=14,f=15);subst(Pol(eval(Vec(s))),'x,16);
n1=hex("200000");n2=hex("1fffff");
v1=digits(n1,256)
v2=digits(n2,256)
subst(Pol(v1),'x,256)==n1
subst(Pol(v2),'x,256)==n2