in simplify you are calling gcd twice on the same arguments. Why not save the result in val?
simplify
gcd
val
Loading collection data...
in
simplify
you are callinggcd
twice on the same arguments. Why not save the result inval
?