# TITLE: Binary Quadratic Form Reducer # AUTHOR: Roy F.A. Maclean # EMAIL: rfamgm at gmail # WEB: http://www.spiderpixel.co.uk/caspro # DATE: 7Dec1995 # MAKE: CASIO # MODEL: fx6300G or greater # SIZE: 145 # NOTES: Enter the integer coefficients of the # binary quadratic form: ax^2+bxy+cy^2 # This program reduces this to an # equivalent reduced form. @@ Program 1 Lbl 0:"A"?->A:"B"?->B "C"?->C Lbl 1 Abs CGoto 2 B>Abs A=>Goto 3 B<=-Abs A=>Goto 3 B<0=>Goto 3 A_ B_ C_ Goto 0 Lbl 2 -B->B:C->D:A->C:D->A Goto 1 Lbl 3 -ABInt (Abs (B/2A))/Abs AB->M M=0=>2A->M AM^2+BM+C->C:2AM+B->B Goto 1