double code(double x, double y, double z, double t) {
return (x / (z - t)) / (z - y);
}
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) * (t - z))
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
code = (x / (z - t)) / (z - y)
end function
public static double code(double x, double y, double z, double t) {
return x / ((y - z) * (t - z));
}
↓
public static double code(double x, double y, double z, double t) {
return (x / (z - t)) / (z - y);
}
def code(x, y, z, t):
return x / ((y - z) * (t - z))
↓
def code(x, y, z, t):
return (x / (z - t)) / (z - y)
function code(x, y, z, t)
return Float64(x / Float64(Float64(y - z) * Float64(t - z)))
end
↓
function code(x, y, z, t)
return Float64(Float64(x / Float64(z - t)) / Float64(z - y))
end
function tmp = code(x, y, z, t)
tmp = x / ((y - z) * (t - z));
end
↓
function tmp = code(x, y, z, t)
tmp = (x / (z - t)) / (z - y);
end
herbie shell --seed 2023138
(FPCore (x y z t)
:name "Data.Random.Distribution.Triangular:triangularCDF from random-fu-0.2.6.2, B"
:precision binary64
:herbie-target
(if (< (/ x (* (- y z) (- t z))) 0.0) (/ (/ x (- y z)) (- t z)) (* x (/ 1.0 (* (- y z) (- t z)))))
(/ x (* (- y z) (- t z))))