Computor.Pp
This file will contain all pretty-printing for computorv1
deltap fmt delta
takes the delta of a given equation and based on its sign, prints the corresponding string
var fmt (var, n)
takes in the optionnal part of a monome and prints it if needed
val mono : Stdlib.Format.formatter -> Ast.monome -> unit
mono fmt (coef, var)
successively prints each element of the monome list
polyprint fmt (terms, variable)
takes a list of terms (power:int * coefficient:float)
and the only variable present in the polynome and takes care of the pretty-printing
equ fmt (polynome_l, polynome_r, var)
takes both sides of the equation as polynomes of type (int * float)
list as well as the only variable present in the equation. The polynome is represented as such instead of a Ast.monome list because of the simplification undertaken in the Hashtable of type (power:int coefficient:float)
. Sending an empty list will simply print 0
, once again this obeys the printing specifications of the ComputorV1 42 subject