
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* 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);
}
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
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (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 tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* 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);
}
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
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (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 tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (fma a 120.0 (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((60.0 / (z - t)) * (x - y)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)
\end{array}
Initial program 99.1%
+-commutative99.1%
fma-def99.1%
associate-*l/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a) :precision binary64 (fma 60.0 (/ (- x y) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return fma(60.0, ((x - y) / (z - t)), (a * 120.0));
}
function code(x, y, z, t, a) return fma(60.0, Float64(Float64(x - y) / Float64(z - t)), Float64(a * 120.0)) end
code[x_, y_, z_, t_, a_] := N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)
\end{array}
Initial program 99.1%
associate-*r/99.8%
fma-def99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -5e+75)
t_1
(if (<= t_1 1e+82)
(+ (* (/ 60.0 (- z t)) x) (* a 120.0))
(* 60.0 (/ (- x y) (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e+75) {
tmp = t_1;
} else if (t_1 <= 1e+82) {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
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
real(8) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-5d+75)) then
tmp = t_1
else if (t_1 <= 1d+82) then
tmp = ((60.0d0 / (z - t)) * x) + (a * 120.0d0)
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e+75) {
tmp = t_1;
} else if (t_1 <= 1e+82) {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -5e+75: tmp = t_1 elif t_1 <= 1e+82: tmp = ((60.0 / (z - t)) * x) + (a * 120.0) else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -5e+75) tmp = t_1; elseif (t_1 <= 1e+82) tmp = Float64(Float64(Float64(60.0 / Float64(z - t)) * x) + Float64(a * 120.0)); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -5e+75) tmp = t_1; elseif (t_1 <= 1e+82) tmp = ((60.0 / (z - t)) * x) + (a * 120.0); else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+75], t$95$1, If[LessEqual[t$95$1, 1e+82], N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+75}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 10^{+82}:\\
\;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -5.0000000000000002e75Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 82.8%
associate-*r/82.9%
Applied egg-rr82.9%
if -5.0000000000000002e75 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 9.9999999999999996e81Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 90.1%
associate-*r/90.1%
associate-*l/90.1%
*-commutative90.1%
Simplified90.1%
if 9.9999999999999996e81 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 94.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 90.1%
Final simplification88.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -1e+71)
t_1
(if (<= t_1 2e+69) (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -1e+71) {
tmp = t_1;
} else if (t_1 <= 2e+69) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
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
real(8) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-1d+71)) then
tmp = t_1
else if (t_1 <= 2d+69) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -1e+71) {
tmp = t_1;
} else if (t_1 <= 2e+69) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -1e+71: tmp = t_1 elif t_1 <= 2e+69: tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -1e+71) tmp = t_1; elseif (t_1 <= 2e+69) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -1e+71) tmp = t_1; elseif (t_1 <= 2e+69) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+71], t$95$1, If[LessEqual[t$95$1, 2e+69], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+69}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -1e71Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 83.2%
associate-*r/83.3%
Applied egg-rr83.3%
if -1e71 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 2.0000000000000001e69Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 78.4%
if 2.0000000000000001e69 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 95.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 88.3%
Final simplification80.9%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -4e-58) (+ (* a 120.0) (* -60.0 (/ y z))) (if (<= (* a 120.0) 5e+31) (* 60.0 (/ (- x y) (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -4e-58) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 5e+31) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
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
real(8) :: tmp
if ((a * 120.0d0) <= (-4d-58)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((a * 120.0d0) <= 5d+31) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -4e-58) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 5e+31) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -4e-58: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (a * 120.0) <= 5e+31: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -4e-58) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (Float64(a * 120.0) <= 5e+31) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -4e-58) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((a * 120.0) <= 5e+31) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e-58], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+31], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{-58}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{+31}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.0000000000000001e-58Initial program 99.9%
Taylor expanded in x around 0 88.9%
Taylor expanded in t around 0 78.6%
if -4.0000000000000001e-58 < (*.f64 a 120) < 5.00000000000000027e31Initial program 97.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 81.1%
if 5.00000000000000027e31 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 84.0%
Final simplification80.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.05e-73)
(* a 120.0)
(if (<= a 1.85e-162)
(* (- x y) (/ -60.0 t))
(if (<= a 9e-136)
(/ (* y -60.0) (- z t))
(if (<= a 1.7e-45) (* -60.0 (/ (- x y) t)) (* a 120.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.05e-73) {
tmp = a * 120.0;
} else if (a <= 1.85e-162) {
tmp = (x - y) * (-60.0 / t);
} else if (a <= 9e-136) {
tmp = (y * -60.0) / (z - t);
} else if (a <= 1.7e-45) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
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
real(8) :: tmp
if (a <= (-1.05d-73)) then
tmp = a * 120.0d0
else if (a <= 1.85d-162) then
tmp = (x - y) * ((-60.0d0) / t)
else if (a <= 9d-136) then
tmp = (y * (-60.0d0)) / (z - t)
else if (a <= 1.7d-45) then
tmp = (-60.0d0) * ((x - y) / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.05e-73) {
tmp = a * 120.0;
} else if (a <= 1.85e-162) {
tmp = (x - y) * (-60.0 / t);
} else if (a <= 9e-136) {
tmp = (y * -60.0) / (z - t);
} else if (a <= 1.7e-45) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.05e-73: tmp = a * 120.0 elif a <= 1.85e-162: tmp = (x - y) * (-60.0 / t) elif a <= 9e-136: tmp = (y * -60.0) / (z - t) elif a <= 1.7e-45: tmp = -60.0 * ((x - y) / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.05e-73) tmp = Float64(a * 120.0); elseif (a <= 1.85e-162) tmp = Float64(Float64(x - y) * Float64(-60.0 / t)); elseif (a <= 9e-136) tmp = Float64(Float64(y * -60.0) / Float64(z - t)); elseif (a <= 1.7e-45) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.05e-73) tmp = a * 120.0; elseif (a <= 1.85e-162) tmp = (x - y) * (-60.0 / t); elseif (a <= 9e-136) tmp = (y * -60.0) / (z - t); elseif (a <= 1.7e-45) tmp = -60.0 * ((x - y) / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.05e-73], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.85e-162], N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e-136], N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.7e-45], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.05 \cdot 10^{-73}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{-162}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{elif}\;a \leq 9 \cdot 10^{-136}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{-45}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.0499999999999999e-73 or 1.70000000000000002e-45 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 76.0%
if -1.0499999999999999e-73 < a < 1.8500000000000001e-162Initial program 98.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 87.5%
Taylor expanded in z around 0 55.8%
*-commutative55.8%
metadata-eval55.8%
times-frac55.8%
associate-*r/55.9%
*-commutative55.9%
associate-/r*56.0%
metadata-eval56.0%
Simplified56.0%
if 1.8500000000000001e-162 < a < 8.99999999999999944e-136Initial program 100.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.8%
associate-*r/78.8%
Applied egg-rr78.8%
Taylor expanded in x around 0 78.7%
associate-*r/78.7%
*-commutative78.7%
Simplified78.7%
if 8.99999999999999944e-136 < a < 1.70000000000000002e-45Initial program 93.5%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in a around 0 74.8%
Taylor expanded in z around 0 49.2%
Final simplification69.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -3e+25) (not (<= x 6.4e-57))) (+ (* (/ 60.0 (- z t)) x) (* a 120.0)) (+ (/ (* y -60.0) (- z t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -3e+25) || !(x <= 6.4e-57)) {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
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
real(8) :: tmp
if ((x <= (-3d+25)) .or. (.not. (x <= 6.4d-57))) then
tmp = ((60.0d0 / (z - t)) * x) + (a * 120.0d0)
else
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -3e+25) || !(x <= 6.4e-57)) {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -3e+25) or not (x <= 6.4e-57): tmp = ((60.0 / (z - t)) * x) + (a * 120.0) else: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -3e+25) || !(x <= 6.4e-57)) tmp = Float64(Float64(Float64(60.0 / Float64(z - t)) * x) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -3e+25) || ~((x <= 6.4e-57))) tmp = ((60.0 / (z - t)) * x) + (a * 120.0); else tmp = ((y * -60.0) / (z - t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -3e+25], N[Not[LessEqual[x, 6.4e-57]], $MachinePrecision]], N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3 \cdot 10^{+25} \lor \neg \left(x \leq 6.4 \cdot 10^{-57}\right):\\
\;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -3.00000000000000006e25 or 6.4000000000000002e-57 < x Initial program 98.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 88.9%
associate-*r/87.2%
associate-*l/88.9%
*-commutative88.9%
Simplified88.9%
if -3.00000000000000006e25 < x < 6.4000000000000002e-57Initial program 99.8%
Taylor expanded in x around 0 96.4%
Final simplification92.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ x t))))
(if (<= a -1.12e-69)
(* a 120.0)
(if (<= a -1.15e-258)
t_1
(if (<= a 4.1e-194)
(* 60.0 (/ y t))
(if (<= a 9.5e-163) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (x / t);
double tmp;
if (a <= -1.12e-69) {
tmp = a * 120.0;
} else if (a <= -1.15e-258) {
tmp = t_1;
} else if (a <= 4.1e-194) {
tmp = 60.0 * (y / t);
} else if (a <= 9.5e-163) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
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
real(8) :: t_1
real(8) :: tmp
t_1 = (-60.0d0) * (x / t)
if (a <= (-1.12d-69)) then
tmp = a * 120.0d0
else if (a <= (-1.15d-258)) then
tmp = t_1
else if (a <= 4.1d-194) then
tmp = 60.0d0 * (y / t)
else if (a <= 9.5d-163) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (x / t);
double tmp;
if (a <= -1.12e-69) {
tmp = a * 120.0;
} else if (a <= -1.15e-258) {
tmp = t_1;
} else if (a <= 4.1e-194) {
tmp = 60.0 * (y / t);
} else if (a <= 9.5e-163) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (x / t) tmp = 0 if a <= -1.12e-69: tmp = a * 120.0 elif a <= -1.15e-258: tmp = t_1 elif a <= 4.1e-194: tmp = 60.0 * (y / t) elif a <= 9.5e-163: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(x / t)) tmp = 0.0 if (a <= -1.12e-69) tmp = Float64(a * 120.0); elseif (a <= -1.15e-258) tmp = t_1; elseif (a <= 4.1e-194) tmp = Float64(60.0 * Float64(y / t)); elseif (a <= 9.5e-163) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (x / t); tmp = 0.0; if (a <= -1.12e-69) tmp = a * 120.0; elseif (a <= -1.15e-258) tmp = t_1; elseif (a <= 4.1e-194) tmp = 60.0 * (y / t); elseif (a <= 9.5e-163) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.12e-69], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.15e-258], t$95$1, If[LessEqual[a, 4.1e-194], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.5e-163], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x}{t}\\
\mathbf{if}\;a \leq -1.12 \cdot 10^{-69}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.15 \cdot 10^{-258}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 4.1 \cdot 10^{-194}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{-163}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.12e-69 or 9.50000000000000012e-163 < a Initial program 99.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 70.3%
if -1.12e-69 < a < -1.14999999999999996e-258 or 4.1000000000000003e-194 < a < 9.50000000000000012e-163Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 87.1%
Taylor expanded in z around 0 49.0%
Taylor expanded in x around inf 41.6%
if -1.14999999999999996e-258 < a < 4.1000000000000003e-194Initial program 95.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 88.5%
Taylor expanded in z around 0 64.3%
Taylor expanded in x around 0 41.5%
Final simplification63.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (/ -60.0 t))))
(if (<= a -1.15e-69)
(* a 120.0)
(if (<= a -2.2e-258)
t_1
(if (<= a 1.55e-193)
(* 60.0 (/ y t))
(if (<= a 6e-163) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (-60.0 / t);
double tmp;
if (a <= -1.15e-69) {
tmp = a * 120.0;
} else if (a <= -2.2e-258) {
tmp = t_1;
} else if (a <= 1.55e-193) {
tmp = 60.0 * (y / t);
} else if (a <= 6e-163) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
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
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((-60.0d0) / t)
if (a <= (-1.15d-69)) then
tmp = a * 120.0d0
else if (a <= (-2.2d-258)) then
tmp = t_1
else if (a <= 1.55d-193) then
tmp = 60.0d0 * (y / t)
else if (a <= 6d-163) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (-60.0 / t);
double tmp;
if (a <= -1.15e-69) {
tmp = a * 120.0;
} else if (a <= -2.2e-258) {
tmp = t_1;
} else if (a <= 1.55e-193) {
tmp = 60.0 * (y / t);
} else if (a <= 6e-163) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (-60.0 / t) tmp = 0 if a <= -1.15e-69: tmp = a * 120.0 elif a <= -2.2e-258: tmp = t_1 elif a <= 1.55e-193: tmp = 60.0 * (y / t) elif a <= 6e-163: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(-60.0 / t)) tmp = 0.0 if (a <= -1.15e-69) tmp = Float64(a * 120.0); elseif (a <= -2.2e-258) tmp = t_1; elseif (a <= 1.55e-193) tmp = Float64(60.0 * Float64(y / t)); elseif (a <= 6e-163) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (-60.0 / t); tmp = 0.0; if (a <= -1.15e-69) tmp = a * 120.0; elseif (a <= -2.2e-258) tmp = t_1; elseif (a <= 1.55e-193) tmp = 60.0 * (y / t); elseif (a <= 6e-163) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.15e-69], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -2.2e-258], t$95$1, If[LessEqual[a, 1.55e-193], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6e-163], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{-60}{t}\\
\mathbf{if}\;a \leq -1.15 \cdot 10^{-69}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -2.2 \cdot 10^{-258}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{-193}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \leq 6 \cdot 10^{-163}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.15e-69 or 6.0000000000000005e-163 < a Initial program 99.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 70.3%
if -1.15e-69 < a < -2.20000000000000015e-258 or 1.5500000000000001e-193 < a < 6.0000000000000005e-163Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 87.1%
Taylor expanded in z around 0 49.0%
Taylor expanded in x around inf 41.6%
associate-*r/41.5%
associate-*l/41.7%
*-commutative41.7%
Simplified41.7%
if -2.20000000000000015e-258 < a < 1.5500000000000001e-193Initial program 95.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 88.5%
Taylor expanded in z around 0 64.3%
Taylor expanded in x around 0 41.5%
Final simplification63.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -8.2e-7) (* a 120.0) (if (<= a 2.2e+29) (* 60.0 (/ (- x y) (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8.2e-7) {
tmp = a * 120.0;
} else if (a <= 2.2e+29) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
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
real(8) :: tmp
if (a <= (-8.2d-7)) then
tmp = a * 120.0d0
else if (a <= 2.2d+29) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8.2e-7) {
tmp = a * 120.0;
} else if (a <= 2.2e+29) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -8.2e-7: tmp = a * 120.0 elif a <= 2.2e+29: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -8.2e-7) tmp = Float64(a * 120.0); elseif (a <= 2.2e+29) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -8.2e-7) tmp = a * 120.0; elseif (a <= 2.2e+29) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -8.2e-7], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 2.2e+29], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.2 \cdot 10^{-7}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{+29}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -8.1999999999999998e-7 or 2.2000000000000001e29 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 82.8%
if -8.1999999999999998e-7 < a < 2.2000000000000001e29Initial program 98.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 78.0%
Final simplification80.6%
(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 / ((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 / ((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 / ((z - t) / (x - y))) + (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(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 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.7e-71) (* a 120.0) (if (<= a 1.8e-46) (* -60.0 (/ (- x y) t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.7e-71) {
tmp = a * 120.0;
} else if (a <= 1.8e-46) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
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
real(8) :: tmp
if (a <= (-2.7d-71)) then
tmp = a * 120.0d0
else if (a <= 1.8d-46) then
tmp = (-60.0d0) * ((x - y) / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.7e-71) {
tmp = a * 120.0;
} else if (a <= 1.8e-46) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.7e-71: tmp = a * 120.0 elif a <= 1.8e-46: tmp = -60.0 * ((x - y) / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.7e-71) tmp = Float64(a * 120.0); elseif (a <= 1.8e-46) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.7e-71) tmp = a * 120.0; elseif (a <= 1.8e-46) tmp = -60.0 * ((x - y) / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.7e-71], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.8e-46], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.7 \cdot 10^{-71}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{-46}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.7000000000000001e-71 or 1.8e-46 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 76.0%
if -2.7000000000000001e-71 < a < 1.8e-46Initial program 97.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 84.4%
Taylor expanded in z around 0 51.9%
Final simplification67.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.5e-73) (* a 120.0) (if (<= a 6.5e-59) (* (- x y) (/ -60.0 t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.5e-73) {
tmp = a * 120.0;
} else if (a <= 6.5e-59) {
tmp = (x - y) * (-60.0 / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
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
real(8) :: tmp
if (a <= (-2.5d-73)) then
tmp = a * 120.0d0
else if (a <= 6.5d-59) then
tmp = (x - y) * ((-60.0d0) / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.5e-73) {
tmp = a * 120.0;
} else if (a <= 6.5e-59) {
tmp = (x - y) * (-60.0 / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.5e-73: tmp = a * 120.0 elif a <= 6.5e-59: tmp = (x - y) * (-60.0 / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.5e-73) tmp = Float64(a * 120.0); elseif (a <= 6.5e-59) tmp = Float64(Float64(x - y) * Float64(-60.0 / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.5e-73) tmp = a * 120.0; elseif (a <= 6.5e-59) tmp = (x - y) * (-60.0 / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.5e-73], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 6.5e-59], N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{-73}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-59}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.4999999999999999e-73 or 6.50000000000000017e-59 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 76.0%
if -2.4999999999999999e-73 < a < 6.50000000000000017e-59Initial program 97.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 84.4%
Taylor expanded in z around 0 51.9%
*-commutative51.9%
metadata-eval51.9%
times-frac51.9%
associate-*r/51.9%
*-commutative51.9%
associate-/r*52.0%
metadata-eval52.0%
Simplified52.0%
Final simplification67.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -6.8e-66) (* a 120.0) (if (<= a 3.2e-220) (* -60.0 (/ x t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.8e-66) {
tmp = a * 120.0;
} else if (a <= 3.2e-220) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
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
real(8) :: tmp
if (a <= (-6.8d-66)) then
tmp = a * 120.0d0
else if (a <= 3.2d-220) then
tmp = (-60.0d0) * (x / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.8e-66) {
tmp = a * 120.0;
} else if (a <= 3.2e-220) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.8e-66: tmp = a * 120.0 elif a <= 3.2e-220: tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.8e-66) tmp = Float64(a * 120.0); elseif (a <= 3.2e-220) tmp = Float64(-60.0 * Float64(x / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6.8e-66) tmp = a * 120.0; elseif (a <= 3.2e-220) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.8e-66], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 3.2e-220], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.8 \cdot 10^{-66}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{-220}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -6.79999999999999994e-66 or 3.20000000000000005e-220 < a Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.8%
if -6.79999999999999994e-66 < a < 3.20000000000000005e-220Initial program 97.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 91.5%
Taylor expanded in z around 0 58.0%
Taylor expanded in x around inf 36.7%
Final simplification61.5%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return 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 = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 56.0%
Final simplification56.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 / ((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 / ((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 / ((z - t) / (x - y))) + (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(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 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2023199
(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)))