real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((x * y) - (z * y)) * t
end function
↓
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x * y) - (z * y)
t_2 = y * ((x - z) * t)
if (t_1 <= (-5d+181)) then
tmp = t_2
else if (t_1 <= 5d+256) then
tmp = (y * (x - z)) * t
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
return ((x * y) - (z * y)) * t;
}
herbie shell --seed 2023064
(FPCore (x y z t)
:name "Linear.Projection:inverseInfinitePerspective from linear-1.19.1.3"
:precision binary64
:herbie-target
(if (< t -9.231879582886777e-80) (* (* y t) (- x z)) (if (< t 2.543067051564877e+83) (* y (* t (- x z))) (* (* y (- x z)) t)))
(* (- (* x y) (* z y)) t))