doublemySqrt(doublef){
if(f>0.0)returnsqrt(f);else {
std::stringerrorStr=std::string("f=")+f+"| sqrt: NAN Alert";logError(errorStr);return0.0;
}
So lets say my code has hundreds of calls to mySqrt and I'm seeing "f=-0.001235| NAN Alert" in my log.
1. Would it be possible to get all the inputs that effect the variable f?
2. Could it use the addition knowledge of f=-0.001235 or any othere inputs I can get out of my logged data as added rules to help rule out any of my hundreds of cases?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Would it be possible to get all the inputs that effect the variable f?
Yes, we have this information in data constraints at the end of the function. For you example: 1:memory:{f=$1 errorStr=(($7)+($1))+($8)} constraints:{($1)<=(0.0)}. So, we have an information that variable f has temporary value $1 which is constrained by equation $1 <= 0.0.
Could it use the addition knowledge of f=-0.001235 or any othere inputs I can get out of my logged data as added rules to help rule out any of my hundreds of cases?
Yes, you can define contracts.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was wondering about this case bellow.
So lets say my code has hundreds of calls to mySqrt and I'm seeing "f=-0.001235| NAN Alert" in my log.
1. Would it be possible to get all the inputs that effect the variable f?
2. Could it use the addition knowledge of f=-0.001235 or any othere inputs I can get out of my logged data as added rules to help rule out any of my hundreds of cases?
Yes, we have this information in data constraints at the end of the function. For you example: 1:memory:{f=$1 errorStr=(($7)+($1))+($8)} constraints:{($1)<=(0.0)}. So, we have an information that variable f has temporary value $1 which is constrained by equation $1 <= 0.0.
Yes, you can define contracts.