(FPCore (x y z t) :precision binary64 (+ x (* (- y x) (/ z t))))
↓
(FPCore (x y z t)
:precision binary64
(if (<= x -3.9e+37)
(+ x (* (- y x) (/ z t)))
(if (<= x -1.7e-277) (+ x (* z (/ (- y x) t))) (+ x (/ (- y x) (/ t z))))))
double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
↓
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.9e+37) {
tmp = x + ((y - x) * (z / t));
} else if (x <= -1.7e-277) {
tmp = x + (z * ((y - x) / t));
} else {
tmp = x + ((y - x) / (t / z));
}
return tmp;
}
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 - x) * (z / 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) :: tmp
if (x <= (-3.9d+37)) then
tmp = x + ((y - x) * (z / t))
else if (x <= (-1.7d-277)) then
tmp = x + (z * ((y - x) / t))
else
tmp = x + ((y - x) / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
↓
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.9e+37) {
tmp = x + ((y - x) * (z / t));
} else if (x <= -1.7e-277) {
tmp = x + (z * ((y - x) / t));
} else {
tmp = x + ((y - x) / (t / z));
}
return tmp;
}
def code(x, y, z, t):
return x + ((y - x) * (z / t))
↓
def code(x, y, z, t):
tmp = 0
if x <= -3.9e+37:
tmp = x + ((y - x) * (z / t))
elif x <= -1.7e-277:
tmp = x + (z * ((y - x) / t))
else:
tmp = x + ((y - x) / (t / z))
return tmp
function code(x, y, z, t)
return Float64(x + Float64(Float64(y - x) * Float64(z / t)))
end
herbie shell --seed 2022330
(FPCore (x y z t)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:tickPosition from plot-0.2.3.4"
:precision binary64
:herbie-target
(if (< (* (- y x) (/ z t)) -1013646692435.8867) (+ x (/ (- y x) (/ t z))) (if (< (* (- y x) (/ z t)) 0.0) (+ x (/ (* (- y x) z) t)) (+ x (/ (- y x) (/ t z)))))
(+ x (* (- y x) (/ z t))))