Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The following script incorrectly produces -Inf.
foo = function(matrix[double] A) return (Double minsc, matrix[double] B) { while(FALSE) {} # prevent inlining minsc = min(A); B = A + 7; } X = seq(1,7); minsc = -Inf; if( avg(X) <= 5 ) { [minsc, X] = foo(X) } # bug: minsc was incorrectly propagated as -Inf, leading to -Inf instead of 2 R = as.matrix(minsc + 1); write(R, $1);