(FPCore (x y z t a)
:precision binary64
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
↓
(FPCore (x y z t a)
:precision binary64
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
↓
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
↓
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
↓
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a):
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
↓
def code(x, y, z, t, a):
return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a)
return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0))
end
↓
function code(x, y, z, t, a)
return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0))
end
function tmp = code(x, y, z, t, a)
tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
end
↓
function tmp = code(x, y, z, t, a)
tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0);
end
(+.f64 (/.f64 60 (/.f64 (-.f64 z t) (-.f64 x y))) (*.f64 a 120)): 0 points increase in error, 0 points decrease in error
(+.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t))) (*.f64 a 120)): 18 points increase in error, 14 points decrease in error
herbie shell --seed 2022325
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:herbie-target
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))