got it! https://en.wikipedia.org/wiki/Three-address_code Three address code. This is it. I knew something like this existed just not what it was called. From this: # Calculate one solution to the [[Quadratic equation]]. x = (-b + sqrt(b^2 – 4*a*c)) / (2*a) To this: t1 := b * b t2 := 4 * a t3 := t2 * c t4 := t1 – t3 t5 := sqrt(t4) t6 := 0 – b t7 := t5 + t6 t8 := 2 * a t9 := t7 / t8 x := t9

got it! https://en.wikipedia.org/wiki/Three-address_code Three address code. This is it. I knew something like this existed just not what it was called.
From this:
# Calculate one solution to the [[Quadratic equation]].
x = (-b + sqrt(b^2 – 4*a*c)) / (2*a)
To this:
t1 := b * b
t2 := 4 * a
t3 := t2 * c
t4 := t1 – t3
t5 := sqrt(t4)
t6 := 0 – b
t7 := t5 + t6
t8 := 2 * a
t9 := t7 / t8
x := t9

Leave a comment

Your email address will not be published. Required fields are marked *


× 6 = twelve

Leave a Reply