
(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 16 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 (* (/ (- x y) (- z t)) 60.0)))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, (((x - y) / (z - t)) * 60.0));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(Float64(x - y) / Float64(z - t)) * 60.0)) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{x - y}{z - t} \cdot 60\right)
\end{array}
Initial program 99.0%
+-commutative99.0%
fma-def99.1%
*-commutative99.1%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (fma a 120.0 (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((x - y) * (60.0 / (z - t))));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \left(x - y\right) \cdot \frac{60}{z - t}\right)
\end{array}
Initial program 99.0%
+-commutative99.0%
fma-def99.1%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (or (<= (* a 120.0) -2e+42)
(not
(or (<= (* a 120.0) -5e-81)
(and (not (<= (* a 120.0) -5e-91)) (<= (* a 120.0) 6e+81)))))
(* a 120.0)
(* (/ (- x y) (- z t)) 60.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2e+42) || !(((a * 120.0) <= -5e-81) || (!((a * 120.0) <= -5e-91) && ((a * 120.0) <= 6e+81)))) {
tmp = a * 120.0;
} else {
tmp = ((x - y) / (z - t)) * 60.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) <= (-2d+42)) .or. (.not. ((a * 120.0d0) <= (-5d-81)) .or. (.not. ((a * 120.0d0) <= (-5d-91))) .and. ((a * 120.0d0) <= 6d+81))) then
tmp = a * 120.0d0
else
tmp = ((x - y) / (z - t)) * 60.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) <= -2e+42) || !(((a * 120.0) <= -5e-81) || (!((a * 120.0) <= -5e-91) && ((a * 120.0) <= 6e+81)))) {
tmp = a * 120.0;
} else {
tmp = ((x - y) / (z - t)) * 60.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -2e+42) or not (((a * 120.0) <= -5e-81) or (not ((a * 120.0) <= -5e-91) and ((a * 120.0) <= 6e+81))): tmp = a * 120.0 else: tmp = ((x - y) / (z - t)) * 60.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -2e+42) || !((Float64(a * 120.0) <= -5e-81) || (!(Float64(a * 120.0) <= -5e-91) && (Float64(a * 120.0) <= 6e+81)))) tmp = Float64(a * 120.0); else tmp = Float64(Float64(Float64(x - y) / Float64(z - t)) * 60.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -2e+42) || ~((((a * 120.0) <= -5e-81) || (~(((a * 120.0) <= -5e-91)) && ((a * 120.0) <= 6e+81))))) tmp = a * 120.0; else tmp = ((x - y) / (z - t)) * 60.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+42], N[Not[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-81], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-91]], $MachinePrecision], LessEqual[N[(a * 120.0), $MachinePrecision], 6e+81]]]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+42} \lor \neg \left(a \cdot 120 \leq -5 \cdot 10^{-81} \lor \neg \left(a \cdot 120 \leq -5 \cdot 10^{-91}\right) \land a \cdot 120 \leq 6 \cdot 10^{+81}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{z - t} \cdot 60\\
\end{array}
\end{array}
if (*.f64 a 120) < -2.00000000000000009e42 or -4.99999999999999981e-81 < (*.f64 a 120) < -4.99999999999999997e-91 or 5.99999999999999995e81 < (*.f64 a 120) Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 80.9%
if -2.00000000000000009e42 < (*.f64 a 120) < -4.99999999999999981e-81 or -4.99999999999999997e-91 < (*.f64 a 120) < 5.99999999999999995e81Initial program 98.4%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 80.3%
Final simplification80.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (/ -60.0 (/ t (- x y))) (* a 120.0))))
(if (<= t -4.3e+54)
t_1
(if (<= t -3.2e-108)
(+ (* x (/ 60.0 (- z t))) (* a 120.0))
(if (<= t 2.4e-24) (+ (/ 60.0 (/ z (- x y))) (* a 120.0)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (-60.0 / (t / (x - y))) + (a * 120.0);
double tmp;
if (t <= -4.3e+54) {
tmp = t_1;
} else if (t <= -3.2e-108) {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
} else if (t <= 2.4e-24) {
tmp = (60.0 / (z / (x - y))) + (a * 120.0);
} else {
tmp = t_1;
}
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) / (t / (x - y))) + (a * 120.0d0)
if (t <= (-4.3d+54)) then
tmp = t_1
else if (t <= (-3.2d-108)) then
tmp = (x * (60.0d0 / (z - t))) + (a * 120.0d0)
else if (t <= 2.4d-24) then
tmp = (60.0d0 / (z / (x - y))) + (a * 120.0d0)
else
tmp = t_1
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 / (t / (x - y))) + (a * 120.0);
double tmp;
if (t <= -4.3e+54) {
tmp = t_1;
} else if (t <= -3.2e-108) {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
} else if (t <= 2.4e-24) {
tmp = (60.0 / (z / (x - y))) + (a * 120.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (-60.0 / (t / (x - y))) + (a * 120.0) tmp = 0 if t <= -4.3e+54: tmp = t_1 elif t <= -3.2e-108: tmp = (x * (60.0 / (z - t))) + (a * 120.0) elif t <= 2.4e-24: tmp = (60.0 / (z / (x - y))) + (a * 120.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-60.0 / Float64(t / Float64(x - y))) + Float64(a * 120.0)) tmp = 0.0 if (t <= -4.3e+54) tmp = t_1; elseif (t <= -3.2e-108) tmp = Float64(Float64(x * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0)); elseif (t <= 2.4e-24) tmp = Float64(Float64(60.0 / Float64(z / Float64(x - y))) + Float64(a * 120.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (-60.0 / (t / (x - y))) + (a * 120.0); tmp = 0.0; if (t <= -4.3e+54) tmp = t_1; elseif (t <= -3.2e-108) tmp = (x * (60.0 / (z - t))) + (a * 120.0); elseif (t <= 2.4e-24) tmp = (60.0 / (z / (x - y))) + (a * 120.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(-60.0 / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.3e+54], t$95$1, If[LessEqual[t, -3.2e-108], N[(N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e-24], N[(N[(60.0 / N[(z / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-60}{\frac{t}{x - y}} + a \cdot 120\\
\mathbf{if}\;t \leq -4.3 \cdot 10^{+54}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -3.2 \cdot 10^{-108}:\\
\;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-24}:\\
\;\;\;\;\frac{60}{\frac{z}{x - y}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.29999999999999976e54 or 2.3999999999999998e-24 < t Initial program 98.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 93.8%
associate-*r/92.3%
associate-/l*93.7%
Simplified93.7%
if -4.29999999999999976e54 < t < -3.2e-108Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 85.4%
associate-*r/85.4%
associate-*l/85.3%
*-commutative85.3%
Simplified85.3%
if -3.2e-108 < t < 2.3999999999999998e-24Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 84.7%
Final simplification89.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ 60.0 (- z t))) (t_2 (+ (* x t_1) (* a 120.0))))
(if (<= x -4.4e+64)
t_2
(if (<= x 1.95e+32)
(+ (/ (* y -60.0) (- z t)) (* a 120.0))
(if (<= x 2.8e+91) (* (- x y) t_1) t_2)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 / (z - t);
double t_2 = (x * t_1) + (a * 120.0);
double tmp;
if (x <= -4.4e+64) {
tmp = t_2;
} else if (x <= 1.95e+32) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else if (x <= 2.8e+91) {
tmp = (x - y) * t_1;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: tmp
t_1 = 60.0d0 / (z - t)
t_2 = (x * t_1) + (a * 120.0d0)
if (x <= (-4.4d+64)) then
tmp = t_2
else if (x <= 1.95d+32) then
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
else if (x <= 2.8d+91) then
tmp = (x - y) * t_1
else
tmp = t_2
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 / (z - t);
double t_2 = (x * t_1) + (a * 120.0);
double tmp;
if (x <= -4.4e+64) {
tmp = t_2;
} else if (x <= 1.95e+32) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else if (x <= 2.8e+91) {
tmp = (x - y) * t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 / (z - t) t_2 = (x * t_1) + (a * 120.0) tmp = 0 if x <= -4.4e+64: tmp = t_2 elif x <= 1.95e+32: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) elif x <= 2.8e+91: tmp = (x - y) * t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 / Float64(z - t)) t_2 = Float64(Float64(x * t_1) + Float64(a * 120.0)) tmp = 0.0 if (x <= -4.4e+64) tmp = t_2; elseif (x <= 1.95e+32) tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); elseif (x <= 2.8e+91) tmp = Float64(Float64(x - y) * t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 / (z - t); t_2 = (x * t_1) + (a * 120.0); tmp = 0.0; if (x <= -4.4e+64) tmp = t_2; elseif (x <= 1.95e+32) tmp = ((y * -60.0) / (z - t)) + (a * 120.0); elseif (x <= 2.8e+91) tmp = (x - y) * t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * t$95$1), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.4e+64], t$95$2, If[LessEqual[x, 1.95e+32], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e+91], N[(N[(x - y), $MachinePrecision] * t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60}{z - t}\\
t_2 := x \cdot t_1 + a \cdot 120\\
\mathbf{if}\;x \leq -4.4 \cdot 10^{+64}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 1.95 \cdot 10^{+32}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+91}:\\
\;\;\;\;\left(x - y\right) \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -4.40000000000000004e64 or 2.7999999999999999e91 < x Initial program 98.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 89.0%
associate-*r/88.0%
associate-*l/88.9%
*-commutative88.9%
Simplified88.9%
if -4.40000000000000004e64 < x < 1.95e32Initial program 99.1%
Taylor expanded in x around 0 91.6%
if 1.95e32 < x < 2.7999999999999999e91Initial program 99.3%
associate-/l*99.5%
Simplified99.5%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 92.2%
associate-*r/92.2%
*-commutative92.2%
associate-*r/92.5%
Simplified92.5%
Final simplification90.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -5e-91) (not (<= (* a 120.0) 0.002))) (+ (* x (/ 60.0 (- z t))) (* a 120.0)) (* (/ (- x y) (- z t)) 60.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -5e-91) || !((a * 120.0) <= 0.002)) {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
} else {
tmp = ((x - y) / (z - t)) * 60.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) <= (-5d-91)) .or. (.not. ((a * 120.0d0) <= 0.002d0))) then
tmp = (x * (60.0d0 / (z - t))) + (a * 120.0d0)
else
tmp = ((x - y) / (z - t)) * 60.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) <= -5e-91) || !((a * 120.0) <= 0.002)) {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
} else {
tmp = ((x - y) / (z - t)) * 60.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -5e-91) or not ((a * 120.0) <= 0.002): tmp = (x * (60.0 / (z - t))) + (a * 120.0) else: tmp = ((x - y) / (z - t)) * 60.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -5e-91) || !(Float64(a * 120.0) <= 0.002)) tmp = Float64(Float64(x * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(x - y) / Float64(z - t)) * 60.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -5e-91) || ~(((a * 120.0) <= 0.002))) tmp = (x * (60.0 / (z - t))) + (a * 120.0); else tmp = ((x - y) / (z - t)) * 60.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-91], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 0.002]], $MachinePrecision]], N[(N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-91} \lor \neg \left(a \cdot 120 \leq 0.002\right):\\
\;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{z - t} \cdot 60\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.99999999999999997e-91 or 2e-3 < (*.f64 a 120) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 85.0%
associate-*r/84.9%
associate-*l/84.9%
*-commutative84.9%
Simplified84.9%
if -4.99999999999999997e-91 < (*.f64 a 120) < 2e-3Initial program 97.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 86.2%
Final simplification85.4%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2e+42)
(* a 120.0)
(if (<= (* a 120.0) 1e+62)
(* (/ (- x y) (- z t)) 60.0)
(+ (* a 120.0) (* 60.0 (/ y t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e+42) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e+62) {
tmp = ((x - y) / (z - t)) * 60.0;
} else {
tmp = (a * 120.0) + (60.0 * (y / 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) :: tmp
if ((a * 120.0d0) <= (-2d+42)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 1d+62) then
tmp = ((x - y) / (z - t)) * 60.0d0
else
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
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) <= -2e+42) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e+62) {
tmp = ((x - y) / (z - t)) * 60.0;
} else {
tmp = (a * 120.0) + (60.0 * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e+42: tmp = a * 120.0 elif (a * 120.0) <= 1e+62: tmp = ((x - y) / (z - t)) * 60.0 else: tmp = (a * 120.0) + (60.0 * (y / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e+42) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 1e+62) tmp = Float64(Float64(Float64(x - y) / Float64(z - t)) * 60.0); else tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e+42) tmp = a * 120.0; elseif ((a * 120.0) <= 1e+62) tmp = ((x - y) / (z - t)) * 60.0; else tmp = (a * 120.0) + (60.0 * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+42], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+62], N[(N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+42}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10^{+62}:\\
\;\;\;\;\frac{x - y}{z - t} \cdot 60\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -2.00000000000000009e42Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 80.4%
if -2.00000000000000009e42 < (*.f64 a 120) < 1.00000000000000004e62Initial program 98.3%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 78.2%
if 1.00000000000000004e62 < (*.f64 a 120) Initial program 99.8%
+-commutative99.8%
fma-def99.9%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around 0 76.4%
Taylor expanded in x around 0 80.4%
Final simplification79.2%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.7e-99)
(* a 120.0)
(if (<= a -2e-278)
(* 60.0 (/ x (- z t)))
(if (<= a 0.00053) (* -60.0 (/ y (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.7e-99) {
tmp = a * 120.0;
} else if (a <= -2e-278) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 0.00053) {
tmp = -60.0 * (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 <= (-1.7d-99)) then
tmp = a * 120.0d0
else if (a <= (-2d-278)) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 0.00053d0) then
tmp = (-60.0d0) * (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 <= -1.7e-99) {
tmp = a * 120.0;
} else if (a <= -2e-278) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 0.00053) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.7e-99: tmp = a * 120.0 elif a <= -2e-278: tmp = 60.0 * (x / (z - t)) elif a <= 0.00053: tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.7e-99) tmp = Float64(a * 120.0); elseif (a <= -2e-278) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 0.00053) tmp = Float64(-60.0 * Float64(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 <= -1.7e-99) tmp = a * 120.0; elseif (a <= -2e-278) tmp = 60.0 * (x / (z - t)); elseif (a <= 0.00053) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.7e-99], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -2e-278], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.00053], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.7 \cdot 10^{-99}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -2 \cdot 10^{-278}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 0.00053:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.70000000000000003e-99 or 5.29999999999999981e-4 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.7%
if -1.70000000000000003e-99 < a < -1.99999999999999988e-278Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 63.8%
if -1.99999999999999988e-278 < a < 5.29999999999999981e-4Initial program 96.5%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 52.9%
Final simplification63.6%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.2e-97)
(* a 120.0)
(if (<= a -8e-279)
(* 60.0 (/ x (- z t)))
(if (<= a 0.094) (* y (/ -60.0 (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.2e-97) {
tmp = a * 120.0;
} else if (a <= -8e-279) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 0.094) {
tmp = y * (-60.0 / (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 <= (-1.2d-97)) then
tmp = a * 120.0d0
else if (a <= (-8d-279)) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 0.094d0) then
tmp = y * ((-60.0d0) / (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 <= -1.2e-97) {
tmp = a * 120.0;
} else if (a <= -8e-279) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 0.094) {
tmp = y * (-60.0 / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.2e-97: tmp = a * 120.0 elif a <= -8e-279: tmp = 60.0 * (x / (z - t)) elif a <= 0.094: tmp = y * (-60.0 / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.2e-97) tmp = Float64(a * 120.0); elseif (a <= -8e-279) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 0.094) tmp = Float64(y * Float64(-60.0 / 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 <= -1.2e-97) tmp = a * 120.0; elseif (a <= -8e-279) tmp = 60.0 * (x / (z - t)); elseif (a <= 0.094) tmp = y * (-60.0 / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.2e-97], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -8e-279], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.094], N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.2 \cdot 10^{-97}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -8 \cdot 10^{-279}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 0.094:\\
\;\;\;\;y \cdot \frac{-60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.2e-97 or 0.094 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.7%
if -1.2e-97 < a < -8.00000000000000044e-279Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 63.8%
if -8.00000000000000044e-279 < a < 0.094Initial program 96.5%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 52.9%
associate-*r/51.3%
Simplified51.3%
associate-/l*52.8%
associate-/r/52.9%
Applied egg-rr52.9%
Final simplification63.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.25e-93) (not (<= a 2.75e-5))) (* a 120.0) (* -60.0 (/ y (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.25e-93) || !(a <= 2.75e-5)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (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) :: tmp
if ((a <= (-2.25d-93)) .or. (.not. (a <= 2.75d-5))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / (z - t))
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.25e-93) || !(a <= 2.75e-5)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.25e-93) or not (a <= 2.75e-5): tmp = a * 120.0 else: tmp = -60.0 * (y / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.25e-93) || !(a <= 2.75e-5)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.25e-93) || ~((a <= 2.75e-5))) tmp = a * 120.0; else tmp = -60.0 * (y / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.25e-93], N[Not[LessEqual[a, 2.75e-5]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.25 \cdot 10^{-93} \lor \neg \left(a \leq 2.75 \cdot 10^{-5}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if a < -2.2500000000000001e-93 or 2.7500000000000001e-5 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.7%
if -2.2500000000000001e-93 < a < 2.7500000000000001e-5Initial program 97.8%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 42.1%
Final simplification57.6%
(FPCore (x y z t a) :precision binary64 (if (<= y -2e+257) (* y (/ -60.0 z)) (if (<= y 4e+205) (* a 120.0) (* (/ y t) (- -60.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2e+257) {
tmp = y * (-60.0 / z);
} else if (y <= 4e+205) {
tmp = a * 120.0;
} else {
tmp = (y / t) * -(-60.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 (y <= (-2d+257)) then
tmp = y * ((-60.0d0) / z)
else if (y <= 4d+205) then
tmp = a * 120.0d0
else
tmp = (y / t) * -(-60.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2e+257) {
tmp = y * (-60.0 / z);
} else if (y <= 4e+205) {
tmp = a * 120.0;
} else {
tmp = (y / t) * -(-60.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2e+257: tmp = y * (-60.0 / z) elif y <= 4e+205: tmp = a * 120.0 else: tmp = (y / t) * -(-60.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2e+257) tmp = Float64(y * Float64(-60.0 / z)); elseif (y <= 4e+205) tmp = Float64(a * 120.0); else tmp = Float64(Float64(y / t) * Float64(-(-60.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2e+257) tmp = y * (-60.0 / z); elseif (y <= 4e+205) tmp = a * 120.0; else tmp = (y / t) * -(-60.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2e+257], N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e+205], N[(a * 120.0), $MachinePrecision], N[(N[(y / t), $MachinePrecision] * (--60.0)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+257}:\\
\;\;\;\;y \cdot \frac{-60}{z}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+205}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t} \cdot \left(--60\right)\\
\end{array}
\end{array}
if y < -2.00000000000000006e257Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 84.5%
associate-*r/84.4%
Simplified84.4%
associate-/l*84.4%
associate-/r/84.6%
Applied egg-rr84.6%
Taylor expanded in z around inf 54.7%
if -2.00000000000000006e257 < y < 4.00000000000000007e205Initial program 99.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 51.4%
if 4.00000000000000007e205 < y Initial program 95.4%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 76.6%
Taylor expanded in z around 0 67.9%
associate-*r/67.9%
neg-mul-167.9%
Simplified67.9%
Final simplification52.9%
(FPCore (x y z t a) :precision binary64 (if (<= y -7.8e+256) (* y (/ -60.0 z)) (if (<= y 5.2e+205) (* a 120.0) (* y (/ 60.0 t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -7.8e+256) {
tmp = y * (-60.0 / z);
} else if (y <= 5.2e+205) {
tmp = a * 120.0;
} else {
tmp = y * (60.0 / 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) :: tmp
if (y <= (-7.8d+256)) then
tmp = y * ((-60.0d0) / z)
else if (y <= 5.2d+205) then
tmp = a * 120.0d0
else
tmp = y * (60.0d0 / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -7.8e+256) {
tmp = y * (-60.0 / z);
} else if (y <= 5.2e+205) {
tmp = a * 120.0;
} else {
tmp = y * (60.0 / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -7.8e+256: tmp = y * (-60.0 / z) elif y <= 5.2e+205: tmp = a * 120.0 else: tmp = y * (60.0 / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -7.8e+256) tmp = Float64(y * Float64(-60.0 / z)); elseif (y <= 5.2e+205) tmp = Float64(a * 120.0); else tmp = Float64(y * Float64(60.0 / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -7.8e+256) tmp = y * (-60.0 / z); elseif (y <= 5.2e+205) tmp = a * 120.0; else tmp = y * (60.0 / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -7.8e+256], N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+205], N[(a * 120.0), $MachinePrecision], N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.8 \cdot 10^{+256}:\\
\;\;\;\;y \cdot \frac{-60}{z}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+205}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{60}{t}\\
\end{array}
\end{array}
if y < -7.80000000000000037e256Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 84.5%
associate-*r/84.4%
Simplified84.4%
associate-/l*84.4%
associate-/r/84.6%
Applied egg-rr84.6%
Taylor expanded in z around inf 54.7%
if -7.80000000000000037e256 < y < 5.1999999999999998e205Initial program 99.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 51.4%
if 5.1999999999999998e205 < y Initial program 95.4%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 76.6%
associate-*r/72.3%
Simplified72.3%
associate-/l*76.6%
associate-/r/76.5%
Applied egg-rr76.5%
Taylor expanded in z around 0 67.8%
Final simplification52.9%
(FPCore (x y z t a) :precision binary64 (+ (* (- x y) (/ 60.0 (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((x - y) * (60.0 / (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 = ((x - y) * (60.0d0 / (z - t))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x - y) * (60.0 / (z - t))) + (a * 120.0);
}
def code(x, y, z, t, a): return ((x - y) * (60.0 / (z - t))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(x - y) * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((x - y) * (60.0 / (z - t))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - y\right) \cdot \frac{60}{z - t} + a \cdot 120
\end{array}
Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.9e+256) (* -60.0 (/ y z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.9e+256) {
tmp = -60.0 * (y / z);
} 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 (y <= (-1.9d+256)) then
tmp = (-60.0d0) * (y / z)
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 (y <= -1.9e+256) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.9e+256: tmp = -60.0 * (y / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.9e+256) tmp = Float64(-60.0 * Float64(y / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.9e+256) tmp = -60.0 * (y / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.9e+256], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{+256}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -1.9000000000000001e256Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 84.5%
Taylor expanded in z around inf 54.5%
if -1.9000000000000001e256 < y Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 49.0%
Final simplification49.2%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.95e+255) (* y (/ -60.0 z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.95e+255) {
tmp = y * (-60.0 / z);
} 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 (y <= (-1.95d+255)) then
tmp = y * ((-60.0d0) / z)
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 (y <= -1.95e+255) {
tmp = y * (-60.0 / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.95e+255: tmp = y * (-60.0 / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.95e+255) tmp = Float64(y * Float64(-60.0 / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.95e+255) tmp = y * (-60.0 / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.95e+255], N[(y * N[(-60.0 / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+255}:\\
\;\;\;\;y \cdot \frac{-60}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -1.95000000000000018e255Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 84.5%
associate-*r/84.4%
Simplified84.4%
associate-/l*84.4%
associate-/r/84.6%
Applied egg-rr84.6%
Taylor expanded in z around inf 54.7%
if -1.95000000000000018e255 < y Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 49.0%
Final simplification49.3%
(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.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 47.3%
Final simplification47.3%
(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 2024011
(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)))