Bug SS-111
5 votes

calculation error occur with symbolic optimization

Created by baijo on 4/17/2014 4:40 AM Last Updated by smath on 9/22/2016 5:07 PM
Logged: 0   (hrs)


I defined a function par(x,y):=1/(1/x+1/y)

When I use it with different parameter y and z this function give me incorrect expression par(y,z)=z/2 with symbolic optimization. 

See the attached .sm file

    smath (Thursday, September 22, 2016 5:07 PM) #


    Martin Kraska (Saturday, April 26, 2014 12:49 PM) #

One might call the reported behaviour an unexpected feature.

The problem is that identical symbols inside and outside the function definition refer to the same object.

    Martin Kraska (Thursday, April 17, 2014 6:35 PM) #

Confirmed. Extremly nasty and dangerous bug. Problem also occures if the function body is wrapped with line()

Thank you for pointing this out.