; drastic shortning for (add/mul '((2 5 4 6) . (2 3 4 1)) '((3/5 4 7) . (2/3 3/4 1))) (define L ((fileVal "Poly/tfe") / 0 zero? + - * number? 1)) (define add (cadddr L)) (define mul (cadr (cddddr L))) (define (N r) (let* ((a (/ (let c ((x (cdr r))(z '())) (if (null? x) z (c (cdr x) (car x)))))) (m (lambda (p) (let m ((p p)) (if (null? p) p (cons (* (car p) a) (m (cdr p)))))))) (cons (m (car r)) (m (cdr r))))) (add '((2 5 4 6) . (2 3 4 1)) '((3/5 4 7) . (2/3 3/4 1))) => (( -26739099736367624548084671058097664/146480797265505781787036772513278125 -2934616196066346794152292648626218624/2783135148044609853953698677752284375 -7383333914704510328339879795917217472/2783135148044609853953698677752284375 -9946945101928756331887497633612331008/2783135148044609853953698677752284375 -1624400308984333191296143766779433088/556627029608921970790739735550456875 -521412444859168678687651085632904448/556627029608921970790739735550456875 ).( -53478199472735249096169342116195328/556627029608921970790739735550456875 -20054324802275718411063503293573248/79518147086988852970105676507208125 -277418159764814104686378462227763264/556627029608921970790739735550456875 -53478199472735249096169342116195328/111325405921784394158147947110091375 -10027162401137859205531751646786624/29296159453101156357407354502655625 -40108649604551436822127006587146496/556627029608921970790739735550456875)) (N (add '((2 5 4 6) . (2 3 4 1)) '((3/5 4 7) . (2/3 3/4 1)))) => ((38/15 439/30 2209/60 248/5 81/2 13) . (4/3 7/2 83/12 20/3 19/4 1)) = ((152 878 2209 2976 2430 780) . (80 210 415 400 285 60)) (mul '((2 5 4 6) . (2 3 4 1)) '((3/5 4 7) . (2/3 3/4 1))) => (( -933150375091617910298175794100452067/14396217717691390294950742566155150763125 -311050125030539303432725264700150689/523498826097868737998208820587460027750 -28305561377779076612377999087713712699/14396217717691390294950742566155150763125 -84916684133337229837133997263141138097/28792435435382780589901485132310301526250 -8087303250794021889250856882203917914/2879243543538278058990148513231030152625 -6532052625641325372087230558703164469/2879243543538278058990148513231030152625 ) . ( -622100250061078606865450529400301378/8637730630614834176970445539693090457875 -2177350875213775124029076852901054823/11516974174153112235960594052924120610500 -25817160377534762184916196970112507187/69101845044918673415763564317544723663000 -622100250061078606865450529400301378/1727546126122966835394089107938618091575 -5909952375580246765221780029302863091/23033948348306224471921188105848241221000 -311050125030539303432725264700150689/5758487087076556117980297026462060305250)) (N (mul '((2 5 4 6) . (2 3 4 1)) '((3/5 4 7) . (2/3 3/4 1)))) => ((6/5 11 182/5 273/5 52 42) . (4/3 7/2 83/12 20/3 19/4 1)) = ((72 660 2184 3276 3120 2520) . (80 210 415 400 285 60)) ------------ 40108649604551436822127006587146496 = 2^8 3^2 ... 556627029608921970790739735550456875 = 5^4 7^2 17^2 19^2 ...