Skip to content
Snippets Groups Projects
Commit b15c3227 authored by Bhatu's avatar Bhatu
Browse files

Fix double scaledown bug for mul like ops.

Squarediff exposed a bug in codegen where both inputs to mul were
same. Depending on the scale of the variable at that point, we
sometimes do a scaledown of the inputs of multiplication so as to
maintain precision.
    scaledown(a, scale)
    scaledown(b, scale)
    mul(a,b)
But in this case both the inputs to mul were same so we were doing
    scaledown(a, scale)
    scaledown(a, scale)
    mul(a,a)
This led to loss of precision. Now we just do:
    scaledown(a, scale)
    mul(a,a)
parent b54294e8
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment