
(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 19 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(60.0 / Float64(Float64(z - t) / Float64(x - y)))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{\frac{z - t}{x - y}}\right)
\end{array}
Initial program 99.0%
+-commutative99.0%
fma-def99.1%
associate-*l/99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.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
(let* ((t_1 (* 60.0 (/ (- x y) z))) (t_2 (* -60.0 (/ (- x y) t))))
(if (<= a -3.9e-14)
(* a 120.0)
(if (<= a -1.12e-141)
(* 60.0 (/ x (- z t)))
(if (<= a -9.2e-216)
t_2
(if (<= a -7.4e-264)
t_1
(if (<= a 8.4e-220)
t_2
(if (<= a 1.45e-186)
t_1
(if (<= a 2.7e-53) t_2 (* a 120.0))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / z);
double t_2 = -60.0 * ((x - y) / t);
double tmp;
if (a <= -3.9e-14) {
tmp = a * 120.0;
} else if (a <= -1.12e-141) {
tmp = 60.0 * (x / (z - t));
} else if (a <= -9.2e-216) {
tmp = t_2;
} else if (a <= -7.4e-264) {
tmp = t_1;
} else if (a <= 8.4e-220) {
tmp = t_2;
} else if (a <= 1.45e-186) {
tmp = t_1;
} else if (a <= 2.7e-53) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / z)
t_2 = (-60.0d0) * ((x - y) / t)
if (a <= (-3.9d-14)) then
tmp = a * 120.0d0
else if (a <= (-1.12d-141)) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= (-9.2d-216)) then
tmp = t_2
else if (a <= (-7.4d-264)) then
tmp = t_1
else if (a <= 8.4d-220) then
tmp = t_2
else if (a <= 1.45d-186) then
tmp = t_1
else if (a <= 2.7d-53) then
tmp = t_2
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 - y) / z);
double t_2 = -60.0 * ((x - y) / t);
double tmp;
if (a <= -3.9e-14) {
tmp = a * 120.0;
} else if (a <= -1.12e-141) {
tmp = 60.0 * (x / (z - t));
} else if (a <= -9.2e-216) {
tmp = t_2;
} else if (a <= -7.4e-264) {
tmp = t_1;
} else if (a <= 8.4e-220) {
tmp = t_2;
} else if (a <= 1.45e-186) {
tmp = t_1;
} else if (a <= 2.7e-53) {
tmp = t_2;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / z) t_2 = -60.0 * ((x - y) / t) tmp = 0 if a <= -3.9e-14: tmp = a * 120.0 elif a <= -1.12e-141: tmp = 60.0 * (x / (z - t)) elif a <= -9.2e-216: tmp = t_2 elif a <= -7.4e-264: tmp = t_1 elif a <= 8.4e-220: tmp = t_2 elif a <= 1.45e-186: tmp = t_1 elif a <= 2.7e-53: tmp = t_2 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / z)) t_2 = Float64(-60.0 * Float64(Float64(x - y) / t)) tmp = 0.0 if (a <= -3.9e-14) tmp = Float64(a * 120.0); elseif (a <= -1.12e-141) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= -9.2e-216) tmp = t_2; elseif (a <= -7.4e-264) tmp = t_1; elseif (a <= 8.4e-220) tmp = t_2; elseif (a <= 1.45e-186) tmp = t_1; elseif (a <= 2.7e-53) tmp = t_2; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / z); t_2 = -60.0 * ((x - y) / t); tmp = 0.0; if (a <= -3.9e-14) tmp = a * 120.0; elseif (a <= -1.12e-141) tmp = 60.0 * (x / (z - t)); elseif (a <= -9.2e-216) tmp = t_2; elseif (a <= -7.4e-264) tmp = t_1; elseif (a <= 8.4e-220) tmp = t_2; elseif (a <= 1.45e-186) tmp = t_1; elseif (a <= 2.7e-53) tmp = t_2; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.9e-14], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.12e-141], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -9.2e-216], t$95$2, If[LessEqual[a, -7.4e-264], t$95$1, If[LessEqual[a, 8.4e-220], t$95$2, If[LessEqual[a, 1.45e-186], t$95$1, If[LessEqual[a, 2.7e-53], t$95$2, N[(a * 120.0), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z}\\
t_2 := -60 \cdot \frac{x - y}{t}\\
\mathbf{if}\;a \leq -3.9 \cdot 10^{-14}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.12 \cdot 10^{-141}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq -9.2 \cdot 10^{-216}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -7.4 \cdot 10^{-264}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 8.4 \cdot 10^{-220}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 1.45 \cdot 10^{-186}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{-53}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -3.8999999999999998e-14 or 2.6999999999999999e-53 < a Initial program 99.2%
Taylor expanded in z around inf 73.8%
if -3.8999999999999998e-14 < a < -1.12000000000000002e-141Initial program 96.7%
*-commutative96.7%
associate-/l*99.8%
frac-2neg99.8%
distribute-frac-neg99.8%
div-inv99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
Applied egg-rr99.9%
+-commutative99.9%
unsub-neg99.9%
div-inv99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 56.9%
if -1.12000000000000002e-141 < a < -9.19999999999999987e-216 or -7.39999999999999991e-264 < a < 8.3999999999999997e-220 or 1.4500000000000001e-186 < a < 2.6999999999999999e-53Initial program 99.6%
+-commutative99.6%
fma-def99.7%
associate-*l/99.6%
Simplified99.6%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 87.1%
Taylor expanded in z around 0 62.6%
if -9.19999999999999987e-216 < a < -7.39999999999999991e-264 or 8.3999999999999997e-220 < a < 1.4500000000000001e-186Initial program 99.6%
+-commutative99.6%
fma-def99.6%
associate-*l/99.5%
Simplified99.5%
associate-/r/99.5%
Applied egg-rr99.5%
Taylor expanded in a around 0 90.9%
Taylor expanded in z around inf 72.5%
Final simplification69.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -5e-10) (not (<= (* a 120.0) 4e-50))) (+ (* -60.0 (/ y (- z t))) (* a 120.0)) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -5e-10) || !((a * 120.0) <= 4e-50)) {
tmp = (-60.0 * (y / (z - t))) + (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) :: tmp
if (((a * 120.0d0) <= (-5d-10)) .or. (.not. ((a * 120.0d0) <= 4d-50))) then
tmp = ((-60.0d0) * (y / (z - t))) + (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 tmp;
if (((a * 120.0) <= -5e-10) || !((a * 120.0) <= 4e-50)) {
tmp = (-60.0 * (y / (z - t))) + (a * 120.0);
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -5e-10) or not ((a * 120.0) <= 4e-50): tmp = (-60.0 * (y / (z - t))) + (a * 120.0) else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -5e-10) || !(Float64(a * 120.0) <= 4e-50)) tmp = Float64(Float64(-60.0 * Float64(y / Float64(z - t))) + 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) tmp = 0.0; if (((a * 120.0) <= -5e-10) || ~(((a * 120.0) <= 4e-50))) tmp = (-60.0 * (y / (z - t))) + (a * 120.0); else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-10], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 4e-50]], $MachinePrecision]], N[(N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $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}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-10} \lor \neg \left(a \cdot 120 \leq 4 \cdot 10^{-50}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -5.00000000000000031e-10 or 4.00000000000000003e-50 < (*.f64 a 120) Initial program 99.2%
Taylor expanded in x around 0 87.2%
if -5.00000000000000031e-10 < (*.f64 a 120) < 4.00000000000000003e-50Initial program 98.8%
+-commutative98.8%
fma-def98.8%
associate-*l/99.6%
Simplified99.6%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 83.9%
Final simplification85.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ (- x y) t))) (t_2 (* 60.0 (/ x (- z t)))))
(if (<= a -3.4e-14)
(* a 120.0)
(if (<= a -1.4e-141)
t_2
(if (<= a 6.5e-259)
t_1
(if (<= a 1.5e-169) t_2 (if (<= a 2.1e-58) t_1 (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * ((x - y) / t);
double t_2 = 60.0 * (x / (z - t));
double tmp;
if (a <= -3.4e-14) {
tmp = a * 120.0;
} else if (a <= -1.4e-141) {
tmp = t_2;
} else if (a <= 6.5e-259) {
tmp = t_1;
} else if (a <= 1.5e-169) {
tmp = t_2;
} else if (a <= 2.1e-58) {
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) :: t_2
real(8) :: tmp
t_1 = (-60.0d0) * ((x - y) / t)
t_2 = 60.0d0 * (x / (z - t))
if (a <= (-3.4d-14)) then
tmp = a * 120.0d0
else if (a <= (-1.4d-141)) then
tmp = t_2
else if (a <= 6.5d-259) then
tmp = t_1
else if (a <= 1.5d-169) then
tmp = t_2
else if (a <= 2.1d-58) 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 - y) / t);
double t_2 = 60.0 * (x / (z - t));
double tmp;
if (a <= -3.4e-14) {
tmp = a * 120.0;
} else if (a <= -1.4e-141) {
tmp = t_2;
} else if (a <= 6.5e-259) {
tmp = t_1;
} else if (a <= 1.5e-169) {
tmp = t_2;
} else if (a <= 2.1e-58) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * ((x - y) / t) t_2 = 60.0 * (x / (z - t)) tmp = 0 if a <= -3.4e-14: tmp = a * 120.0 elif a <= -1.4e-141: tmp = t_2 elif a <= 6.5e-259: tmp = t_1 elif a <= 1.5e-169: tmp = t_2 elif a <= 2.1e-58: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(Float64(x - y) / t)) t_2 = Float64(60.0 * Float64(x / Float64(z - t))) tmp = 0.0 if (a <= -3.4e-14) tmp = Float64(a * 120.0); elseif (a <= -1.4e-141) tmp = t_2; elseif (a <= 6.5e-259) tmp = t_1; elseif (a <= 1.5e-169) tmp = t_2; elseif (a <= 2.1e-58) 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 - y) / t); t_2 = 60.0 * (x / (z - t)); tmp = 0.0; if (a <= -3.4e-14) tmp = a * 120.0; elseif (a <= -1.4e-141) tmp = t_2; elseif (a <= 6.5e-259) tmp = t_1; elseif (a <= 1.5e-169) tmp = t_2; elseif (a <= 2.1e-58) 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[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.4e-14], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.4e-141], t$95$2, If[LessEqual[a, 6.5e-259], t$95$1, If[LessEqual[a, 1.5e-169], t$95$2, If[LessEqual[a, 2.1e-58], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x - y}{t}\\
t_2 := 60 \cdot \frac{x}{z - t}\\
\mathbf{if}\;a \leq -3.4 \cdot 10^{-14}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.4 \cdot 10^{-141}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-259}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-169}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{-58}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -3.40000000000000003e-14 or 2.09999999999999988e-58 < a Initial program 99.2%
Taylor expanded in z around inf 73.8%
if -3.40000000000000003e-14 < a < -1.40000000000000006e-141 or 6.50000000000000045e-259 < a < 1.5e-169Initial program 98.0%
*-commutative98.0%
associate-/l*99.6%
frac-2neg99.6%
distribute-frac-neg99.6%
div-inv99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
+-commutative99.7%
unsub-neg99.7%
div-inv99.5%
*-commutative99.5%
associate-/r*99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 54.4%
if -1.40000000000000006e-141 < a < 6.50000000000000045e-259 or 1.5e-169 < a < 2.09999999999999988e-58Initial program 99.6%
+-commutative99.6%
fma-def99.7%
associate-*l/99.6%
Simplified99.6%
associate-/r/99.5%
Applied egg-rr99.5%
Taylor expanded in a around 0 88.6%
Taylor expanded in z around 0 55.9%
Final simplification66.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ x (- z t)))))
(if (<= a -1.14e-13)
(* a 120.0)
(if (<= a -1.75e-149)
t_1
(if (<= a 3.15e-201)
(* y (/ -60.0 (- z t)))
(if (<= a 4e-150)
t_1
(if (<= a 1.6e-55) (* -60.0 (/ (- x y) t)) (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / (z - t));
double tmp;
if (a <= -1.14e-13) {
tmp = a * 120.0;
} else if (a <= -1.75e-149) {
tmp = t_1;
} else if (a <= 3.15e-201) {
tmp = y * (-60.0 / (z - t));
} else if (a <= 4e-150) {
tmp = t_1;
} else if (a <= 1.6e-55) {
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) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * (x / (z - t))
if (a <= (-1.14d-13)) then
tmp = a * 120.0d0
else if (a <= (-1.75d-149)) then
tmp = t_1
else if (a <= 3.15d-201) then
tmp = y * ((-60.0d0) / (z - t))
else if (a <= 4d-150) then
tmp = t_1
else if (a <= 1.6d-55) 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 t_1 = 60.0 * (x / (z - t));
double tmp;
if (a <= -1.14e-13) {
tmp = a * 120.0;
} else if (a <= -1.75e-149) {
tmp = t_1;
} else if (a <= 3.15e-201) {
tmp = y * (-60.0 / (z - t));
} else if (a <= 4e-150) {
tmp = t_1;
} else if (a <= 1.6e-55) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * (x / (z - t)) tmp = 0 if a <= -1.14e-13: tmp = a * 120.0 elif a <= -1.75e-149: tmp = t_1 elif a <= 3.15e-201: tmp = y * (-60.0 / (z - t)) elif a <= 4e-150: tmp = t_1 elif a <= 1.6e-55: tmp = -60.0 * ((x - y) / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(x / Float64(z - t))) tmp = 0.0 if (a <= -1.14e-13) tmp = Float64(a * 120.0); elseif (a <= -1.75e-149) tmp = t_1; elseif (a <= 3.15e-201) tmp = Float64(y * Float64(-60.0 / Float64(z - t))); elseif (a <= 4e-150) tmp = t_1; elseif (a <= 1.6e-55) 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) t_1 = 60.0 * (x / (z - t)); tmp = 0.0; if (a <= -1.14e-13) tmp = a * 120.0; elseif (a <= -1.75e-149) tmp = t_1; elseif (a <= 3.15e-201) tmp = y * (-60.0 / (z - t)); elseif (a <= 4e-150) tmp = t_1; elseif (a <= 1.6e-55) tmp = -60.0 * ((x - y) / t); 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 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.14e-13], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.75e-149], t$95$1, If[LessEqual[a, 3.15e-201], N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4e-150], t$95$1, If[LessEqual[a, 1.6e-55], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x}{z - t}\\
\mathbf{if}\;a \leq -1.14 \cdot 10^{-13}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.75 \cdot 10^{-149}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3.15 \cdot 10^{-201}:\\
\;\;\;\;y \cdot \frac{-60}{z - t}\\
\mathbf{elif}\;a \leq 4 \cdot 10^{-150}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{-55}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.13999999999999994e-13 or 1.6000000000000001e-55 < a Initial program 99.2%
Taylor expanded in z around inf 73.8%
if -1.13999999999999994e-13 < a < -1.75e-149 or 3.15e-201 < a < 4.00000000000000003e-150Initial program 97.7%
*-commutative97.7%
associate-/l*99.7%
frac-2neg99.7%
distribute-frac-neg99.7%
div-inv99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
+-commutative99.7%
unsub-neg99.7%
div-inv99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 58.7%
if -1.75e-149 < a < 3.15e-201Initial program 99.6%
*-commutative99.6%
associate-/l*99.6%
frac-2neg99.6%
distribute-frac-neg99.6%
div-inv99.6%
distribute-rgt-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
Applied egg-rr99.6%
+-commutative99.6%
unsub-neg99.6%
div-inv99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 70.2%
associate-*r/70.3%
Simplified70.3%
Taylor expanded in a around 0 58.6%
associate-*r/58.7%
associate-*l/58.6%
*-commutative58.6%
Simplified58.6%
if 4.00000000000000003e-150 < a < 1.6000000000000001e-55Initial program 99.6%
+-commutative99.6%
fma-def99.7%
associate-*l/99.6%
Simplified99.6%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 91.5%
Taylor expanded in z around 0 67.2%
Final simplification67.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.9e-14)
(* a 120.0)
(if (<= a -1.45e-147)
(* 60.0 (/ x (- z t)))
(if (<= a 4.2e-201)
(* y (/ -60.0 (- z t)))
(if (<= a 9e-110)
(/ 60.0 (/ (- z t) x))
(if (<= a 1.7e-53) (* -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.9e-14) {
tmp = a * 120.0;
} else if (a <= -1.45e-147) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 4.2e-201) {
tmp = y * (-60.0 / (z - t));
} else if (a <= 9e-110) {
tmp = 60.0 / ((z - t) / x);
} else if (a <= 1.7e-53) {
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.9d-14)) then
tmp = a * 120.0d0
else if (a <= (-1.45d-147)) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 4.2d-201) then
tmp = y * ((-60.0d0) / (z - t))
else if (a <= 9d-110) then
tmp = 60.0d0 / ((z - t) / x)
else if (a <= 1.7d-53) 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.9e-14) {
tmp = a * 120.0;
} else if (a <= -1.45e-147) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 4.2e-201) {
tmp = y * (-60.0 / (z - t));
} else if (a <= 9e-110) {
tmp = 60.0 / ((z - t) / x);
} else if (a <= 1.7e-53) {
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.9e-14: tmp = a * 120.0 elif a <= -1.45e-147: tmp = 60.0 * (x / (z - t)) elif a <= 4.2e-201: tmp = y * (-60.0 / (z - t)) elif a <= 9e-110: tmp = 60.0 / ((z - t) / x) elif a <= 1.7e-53: 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.9e-14) tmp = Float64(a * 120.0); elseif (a <= -1.45e-147) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 4.2e-201) tmp = Float64(y * Float64(-60.0 / Float64(z - t))); elseif (a <= 9e-110) tmp = Float64(60.0 / Float64(Float64(z - t) / x)); elseif (a <= 1.7e-53) 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.9e-14) tmp = a * 120.0; elseif (a <= -1.45e-147) tmp = 60.0 * (x / (z - t)); elseif (a <= 4.2e-201) tmp = y * (-60.0 / (z - t)); elseif (a <= 9e-110) tmp = 60.0 / ((z - t) / x); elseif (a <= 1.7e-53) 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.9e-14], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.45e-147], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.2e-201], N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e-110], N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.7e-53], 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.9 \cdot 10^{-14}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.45 \cdot 10^{-147}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{-201}:\\
\;\;\;\;y \cdot \frac{-60}{z - t}\\
\mathbf{elif}\;a \leq 9 \cdot 10^{-110}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x}}\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{-53}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.9000000000000003e-14 or 1.7e-53 < a Initial program 99.2%
Taylor expanded in z around inf 73.8%
if -2.9000000000000003e-14 < a < -1.4500000000000001e-147Initial program 96.8%
*-commutative96.8%
associate-/l*99.8%
frac-2neg99.8%
distribute-frac-neg99.8%
div-inv99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
Applied egg-rr99.9%
+-commutative99.9%
unsub-neg99.9%
div-inv99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 58.2%
if -1.4500000000000001e-147 < a < 4.20000000000000024e-201Initial program 99.6%
*-commutative99.6%
associate-/l*99.6%
frac-2neg99.6%
distribute-frac-neg99.6%
div-inv99.6%
distribute-rgt-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
Applied egg-rr99.6%
+-commutative99.6%
unsub-neg99.6%
div-inv99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 70.2%
associate-*r/70.3%
Simplified70.3%
Taylor expanded in a around 0 58.6%
associate-*r/58.7%
associate-*l/58.6%
*-commutative58.6%
Simplified58.6%
if 4.20000000000000024e-201 < a < 9.0000000000000002e-110Initial program 99.8%
*-commutative99.8%
associate-/l*99.4%
frac-2neg99.4%
distribute-frac-neg99.4%
div-inv99.4%
distribute-rgt-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
+-commutative99.4%
unsub-neg99.4%
div-inv99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in x around inf 54.1%
associate-*r/54.2%
associate-/l*54.3%
Applied egg-rr54.3%
if 9.0000000000000002e-110 < a < 1.7e-53Initial program 99.7%
+-commutative99.7%
fma-def99.7%
associate-*l/99.7%
Simplified99.7%
associate-/r/99.4%
Applied egg-rr99.4%
Taylor expanded in a around 0 100.0%
Taylor expanded in z around 0 100.0%
Final simplification67.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.4e-14)
(* a 120.0)
(if (<= a -7.4e-144)
(* 60.0 (/ x (- z t)))
(if (<= a 4.7e-201)
(/ (* y -60.0) (- z t))
(if (<= a 1.8e-109)
(/ 60.0 (/ (- z t) x))
(if (<= a 6.5e-55) (* -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.4e-14) {
tmp = a * 120.0;
} else if (a <= -7.4e-144) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 4.7e-201) {
tmp = (y * -60.0) / (z - t);
} else if (a <= 1.8e-109) {
tmp = 60.0 / ((z - t) / x);
} else if (a <= 6.5e-55) {
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.4d-14)) then
tmp = a * 120.0d0
else if (a <= (-7.4d-144)) then
tmp = 60.0d0 * (x / (z - t))
else if (a <= 4.7d-201) then
tmp = (y * (-60.0d0)) / (z - t)
else if (a <= 1.8d-109) then
tmp = 60.0d0 / ((z - t) / x)
else if (a <= 6.5d-55) 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.4e-14) {
tmp = a * 120.0;
} else if (a <= -7.4e-144) {
tmp = 60.0 * (x / (z - t));
} else if (a <= 4.7e-201) {
tmp = (y * -60.0) / (z - t);
} else if (a <= 1.8e-109) {
tmp = 60.0 / ((z - t) / x);
} else if (a <= 6.5e-55) {
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.4e-14: tmp = a * 120.0 elif a <= -7.4e-144: tmp = 60.0 * (x / (z - t)) elif a <= 4.7e-201: tmp = (y * -60.0) / (z - t) elif a <= 1.8e-109: tmp = 60.0 / ((z - t) / x) elif a <= 6.5e-55: 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.4e-14) tmp = Float64(a * 120.0); elseif (a <= -7.4e-144) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (a <= 4.7e-201) tmp = Float64(Float64(y * -60.0) / Float64(z - t)); elseif (a <= 1.8e-109) tmp = Float64(60.0 / Float64(Float64(z - t) / x)); elseif (a <= 6.5e-55) 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.4e-14) tmp = a * 120.0; elseif (a <= -7.4e-144) tmp = 60.0 * (x / (z - t)); elseif (a <= 4.7e-201) tmp = (y * -60.0) / (z - t); elseif (a <= 1.8e-109) tmp = 60.0 / ((z - t) / x); elseif (a <= 6.5e-55) 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.4e-14], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -7.4e-144], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.7e-201], N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.8e-109], N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e-55], 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.4 \cdot 10^{-14}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -7.4 \cdot 10^{-144}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;a \leq 4.7 \cdot 10^{-201}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{-109}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x}}\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-55}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.4e-14 or 6.50000000000000006e-55 < a Initial program 99.2%
Taylor expanded in z around inf 73.8%
if -2.4e-14 < a < -7.4000000000000005e-144Initial program 96.8%
*-commutative96.8%
associate-/l*99.8%
frac-2neg99.8%
distribute-frac-neg99.8%
div-inv99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
Applied egg-rr99.9%
+-commutative99.9%
unsub-neg99.9%
div-inv99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 58.2%
if -7.4000000000000005e-144 < a < 4.69999999999999994e-201Initial program 99.6%
*-commutative99.6%
associate-/l*99.6%
frac-2neg99.6%
distribute-frac-neg99.6%
div-inv99.6%
distribute-rgt-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
Applied egg-rr99.6%
+-commutative99.6%
unsub-neg99.6%
div-inv99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in y around inf 58.6%
associate-*r/58.7%
Simplified58.7%
if 4.69999999999999994e-201 < a < 1.8e-109Initial program 99.8%
*-commutative99.8%
associate-/l*99.4%
frac-2neg99.4%
distribute-frac-neg99.4%
div-inv99.4%
distribute-rgt-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
Applied egg-rr99.4%
+-commutative99.4%
unsub-neg99.4%
div-inv99.5%
*-commutative99.5%
associate-/r*99.5%
metadata-eval99.5%
Applied egg-rr99.5%
Taylor expanded in x around inf 54.1%
associate-*r/54.2%
associate-/l*54.3%
Applied egg-rr54.3%
if 1.8e-109 < a < 6.50000000000000006e-55Initial program 99.7%
+-commutative99.7%
fma-def99.7%
associate-*l/99.7%
Simplified99.7%
associate-/r/99.4%
Applied egg-rr99.4%
Taylor expanded in a around 0 100.0%
Taylor expanded in z around 0 100.0%
Final simplification67.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -5e-10) (not (<= (* a 120.0) 4e-50))) (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -5e-10) || !((a * 120.0) <= 4e-50)) {
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) :: tmp
if (((a * 120.0d0) <= (-5d-10)) .or. (.not. ((a * 120.0d0) <= 4d-50))) 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 tmp;
if (((a * 120.0) <= -5e-10) || !((a * 120.0) <= 4e-50)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -5e-10) or not ((a * 120.0) <= 4e-50): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -5e-10) || !(Float64(a * 120.0) <= 4e-50)) 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) tmp = 0.0; if (((a * 120.0) <= -5e-10) || ~(((a * 120.0) <= 4e-50))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-10], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 4e-50]], $MachinePrecision]], 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}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-10} \lor \neg \left(a \cdot 120 \leq 4 \cdot 10^{-50}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -5.00000000000000031e-10 or 4.00000000000000003e-50 < (*.f64 a 120) Initial program 99.2%
Taylor expanded in z around inf 74.1%
if -5.00000000000000031e-10 < (*.f64 a 120) < 4.00000000000000003e-50Initial program 98.8%
+-commutative98.8%
fma-def98.8%
associate-*l/99.6%
Simplified99.6%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 83.9%
Final simplification78.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -5e-10) (not (<= (* a 120.0) 4e-50))) (+ (* a 120.0) (/ (* x -60.0) t)) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -5e-10) || !((a * 120.0) <= 4e-50)) {
tmp = (a * 120.0) + ((x * -60.0) / t);
} 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) :: tmp
if (((a * 120.0d0) <= (-5d-10)) .or. (.not. ((a * 120.0d0) <= 4d-50))) then
tmp = (a * 120.0d0) + ((x * (-60.0d0)) / t)
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 tmp;
if (((a * 120.0) <= -5e-10) || !((a * 120.0) <= 4e-50)) {
tmp = (a * 120.0) + ((x * -60.0) / t);
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -5e-10) or not ((a * 120.0) <= 4e-50): tmp = (a * 120.0) + ((x * -60.0) / t) else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -5e-10) || !(Float64(a * 120.0) <= 4e-50)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * -60.0) / t)); 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) tmp = 0.0; if (((a * 120.0) <= -5e-10) || ~(((a * 120.0) <= 4e-50))) tmp = (a * 120.0) + ((x * -60.0) / t); else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-10], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 4e-50]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-10} \lor \neg \left(a \cdot 120 \leq 4 \cdot 10^{-50}\right):\\
\;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -5.00000000000000031e-10 or 4.00000000000000003e-50 < (*.f64 a 120) Initial program 99.2%
Taylor expanded in x around inf 87.4%
Taylor expanded in z around 0 75.5%
associate-*r/12.4%
Simplified75.5%
if -5.00000000000000031e-10 < (*.f64 a 120) < 4.00000000000000003e-50Initial program 98.8%
+-commutative98.8%
fma-def98.8%
associate-*l/99.6%
Simplified99.6%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 83.9%
Final simplification79.1%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e-10)
(- (* a 120.0) (* -60.0 (/ y t)))
(if (<= (* a 120.0) 4e-50)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (/ (* x -60.0) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e-10) {
tmp = (a * 120.0) - (-60.0 * (y / t));
} else if ((a * 120.0) <= 4e-50) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + ((x * -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 ((a * 120.0d0) <= (-5d-10)) then
tmp = (a * 120.0d0) - ((-60.0d0) * (y / t))
else if ((a * 120.0d0) <= 4d-50) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + ((x * (-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 ((a * 120.0) <= -5e-10) {
tmp = (a * 120.0) - (-60.0 * (y / t));
} else if ((a * 120.0) <= 4e-50) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + ((x * -60.0) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e-10: tmp = (a * 120.0) - (-60.0 * (y / t)) elif (a * 120.0) <= 4e-50: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + ((x * -60.0) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e-10) tmp = Float64(Float64(a * 120.0) - Float64(-60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= 4e-50) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * -60.0) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e-10) tmp = (a * 120.0) - (-60.0 * (y / t)); elseif ((a * 120.0) <= 4e-50) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + ((x * -60.0) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-10], N[(N[(a * 120.0), $MachinePrecision] - N[(-60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 4e-50], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{-10}:\\
\;\;\;\;a \cdot 120 - -60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 4 \cdot 10^{-50}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot -60}{t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -5.00000000000000031e-10Initial program 98.6%
*-commutative98.6%
associate-/l*99.9%
frac-2neg99.9%
distribute-frac-neg99.9%
div-inv99.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in x around 0 78.9%
if -5.00000000000000031e-10 < (*.f64 a 120) < 4.00000000000000003e-50Initial program 98.8%
+-commutative98.8%
fma-def98.8%
associate-*l/99.6%
Simplified99.6%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 83.9%
if 4.00000000000000003e-50 < (*.f64 a 120) Initial program 99.9%
Taylor expanded in x around inf 93.4%
Taylor expanded in z around 0 77.1%
associate-*r/14.7%
Simplified77.1%
Final simplification80.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -9e-35) (not (<= x 1.12e+101))) (+ (* 60.0 (/ x (- z t))) (* a 120.0)) (+ (* -60.0 (/ y (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -9e-35) || !(x <= 1.12e+101)) {
tmp = (60.0 * (x / (z - t))) + (a * 120.0);
} else {
tmp = (-60.0 * (y / (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 <= (-9d-35)) .or. (.not. (x <= 1.12d+101))) then
tmp = (60.0d0 * (x / (z - t))) + (a * 120.0d0)
else
tmp = ((-60.0d0) * (y / (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 <= -9e-35) || !(x <= 1.12e+101)) {
tmp = (60.0 * (x / (z - t))) + (a * 120.0);
} else {
tmp = (-60.0 * (y / (z - t))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -9e-35) or not (x <= 1.12e+101): tmp = (60.0 * (x / (z - t))) + (a * 120.0) else: tmp = (-60.0 * (y / (z - t))) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -9e-35) || !(x <= 1.12e+101)) tmp = Float64(Float64(60.0 * Float64(x / Float64(z - t))) + Float64(a * 120.0)); else tmp = Float64(Float64(-60.0 * Float64(y / 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 <= -9e-35) || ~((x <= 1.12e+101))) tmp = (60.0 * (x / (z - t))) + (a * 120.0); else tmp = (-60.0 * (y / (z - t))) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -9e-35], N[Not[LessEqual[x, 1.12e+101]], $MachinePrecision]], N[(N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{-35} \lor \neg \left(x \leq 1.12 \cdot 10^{+101}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -9.0000000000000002e-35 or 1.1199999999999999e101 < x Initial program 99.0%
Taylor expanded in x around inf 91.5%
if -9.0000000000000002e-35 < x < 1.1199999999999999e101Initial program 99.1%
Taylor expanded in x around 0 92.6%
Final simplification92.1%
(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%
Applied egg-rr99.7%
Final simplification99.7%
(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(60.0 * Float64(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[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
60 \cdot \frac{x - y}{z - t} + a \cdot 120
\end{array}
Initial program 99.0%
*-commutative99.0%
associate-*l/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= x -1.1e-289)
(* a 120.0)
(if (<= x 3.55e-273)
(* 60.0 (/ y t))
(if (<= x 8e+128) (* a 120.0) (* -60.0 (/ x t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.1e-289) {
tmp = a * 120.0;
} else if (x <= 3.55e-273) {
tmp = 60.0 * (y / t);
} else if (x <= 8e+128) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / 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 (x <= (-1.1d-289)) then
tmp = a * 120.0d0
else if (x <= 3.55d-273) then
tmp = 60.0d0 * (y / t)
else if (x <= 8d+128) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (x / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.1e-289) {
tmp = a * 120.0;
} else if (x <= 3.55e-273) {
tmp = 60.0 * (y / t);
} else if (x <= 8e+128) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.1e-289: tmp = a * 120.0 elif x <= 3.55e-273: tmp = 60.0 * (y / t) elif x <= 8e+128: tmp = a * 120.0 else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.1e-289) tmp = Float64(a * 120.0); elseif (x <= 3.55e-273) tmp = Float64(60.0 * Float64(y / t)); elseif (x <= 8e+128) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(x / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.1e-289) tmp = a * 120.0; elseif (x <= 3.55e-273) tmp = 60.0 * (y / t); elseif (x <= 8e+128) tmp = a * 120.0; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.1e-289], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, 3.55e-273], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8e+128], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{-289}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x \leq 3.55 \cdot 10^{-273}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{elif}\;x \leq 8 \cdot 10^{+128}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if x < -1.1e-289 or 3.54999999999999992e-273 < x < 8.0000000000000006e128Initial program 98.8%
Taylor expanded in z around inf 58.1%
if -1.1e-289 < x < 3.54999999999999992e-273Initial program 99.6%
*-commutative99.6%
associate-/l*99.8%
frac-2neg99.8%
distribute-frac-neg99.8%
div-inv99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 67.0%
*-commutative67.0%
Simplified67.0%
Taylor expanded in y around inf 53.5%
if 8.0000000000000006e128 < x Initial program 99.8%
*-commutative99.8%
associate-/l*99.7%
frac-2neg99.7%
distribute-frac-neg99.7%
div-inv99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
+-commutative99.7%
unsub-neg99.7%
div-inv99.6%
*-commutative99.6%
associate-/r*99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 72.3%
Taylor expanded in z around 0 49.0%
Final simplification56.2%
(FPCore (x y z t a)
:precision binary64
(if (<= x -1.1e-289)
(* a 120.0)
(if (<= x 3.55e-273)
(* 60.0 (/ y t))
(if (<= x 8e+128) (* a 120.0) (/ (* x -60.0) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.1e-289) {
tmp = a * 120.0;
} else if (x <= 3.55e-273) {
tmp = 60.0 * (y / t);
} else if (x <= 8e+128) {
tmp = a * 120.0;
} else {
tmp = (x * -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 (x <= (-1.1d-289)) then
tmp = a * 120.0d0
else if (x <= 3.55d-273) then
tmp = 60.0d0 * (y / t)
else if (x <= 8d+128) then
tmp = a * 120.0d0
else
tmp = (x * (-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 (x <= -1.1e-289) {
tmp = a * 120.0;
} else if (x <= 3.55e-273) {
tmp = 60.0 * (y / t);
} else if (x <= 8e+128) {
tmp = a * 120.0;
} else {
tmp = (x * -60.0) / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.1e-289: tmp = a * 120.0 elif x <= 3.55e-273: tmp = 60.0 * (y / t) elif x <= 8e+128: tmp = a * 120.0 else: tmp = (x * -60.0) / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.1e-289) tmp = Float64(a * 120.0); elseif (x <= 3.55e-273) tmp = Float64(60.0 * Float64(y / t)); elseif (x <= 8e+128) tmp = Float64(a * 120.0); else tmp = Float64(Float64(x * -60.0) / t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.1e-289) tmp = a * 120.0; elseif (x <= 3.55e-273) tmp = 60.0 * (y / t); elseif (x <= 8e+128) tmp = a * 120.0; else tmp = (x * -60.0) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.1e-289], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, 3.55e-273], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8e+128], N[(a * 120.0), $MachinePrecision], N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{-289}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x \leq 3.55 \cdot 10^{-273}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{elif}\;x \leq 8 \cdot 10^{+128}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot -60}{t}\\
\end{array}
\end{array}
if x < -1.1e-289 or 3.54999999999999992e-273 < x < 8.0000000000000006e128Initial program 98.8%
Taylor expanded in z around inf 58.1%
if -1.1e-289 < x < 3.54999999999999992e-273Initial program 99.6%
*-commutative99.6%
associate-/l*99.8%
frac-2neg99.8%
distribute-frac-neg99.8%
div-inv99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 67.0%
*-commutative67.0%
Simplified67.0%
Taylor expanded in y around inf 53.5%
if 8.0000000000000006e128 < x Initial program 99.8%
*-commutative99.8%
associate-/l*99.7%
frac-2neg99.7%
distribute-frac-neg99.7%
div-inv99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
+-commutative99.7%
unsub-neg99.7%
div-inv99.6%
*-commutative99.6%
associate-/r*99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 72.3%
Taylor expanded in z around 0 49.0%
associate-*r/49.0%
Simplified49.0%
Final simplification56.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.02e-68) (not (<= a 3.1e-54))) (* a 120.0) (* -60.0 (/ (- x y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.02e-68) || !(a <= 3.1e-54)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - 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 <= (-1.02d-68)) .or. (.not. (a <= 3.1d-54))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * ((x - 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 <= -1.02e-68) || !(a <= 3.1e-54)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.02e-68) or not (a <= 3.1e-54): tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.02e-68) || !(a <= 3.1e-54)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.02e-68) || ~((a <= 3.1e-54))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.02e-68], N[Not[LessEqual[a, 3.1e-54]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.02 \cdot 10^{-68} \lor \neg \left(a \leq 3.1 \cdot 10^{-54}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -1.01999999999999997e-68 or 3.10000000000000004e-54 < a Initial program 99.3%
Taylor expanded in z around inf 70.2%
if -1.01999999999999997e-68 < a < 3.10000000000000004e-54Initial program 98.6%
+-commutative98.6%
fma-def98.7%
associate-*l/99.6%
Simplified99.6%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 86.5%
Taylor expanded in z around 0 45.9%
Final simplification61.4%
(FPCore (x y z t a) :precision binary64 (if (<= x 7.5e+128) (* a 120.0) (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 7.5e+128) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / 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 (x <= 7.5d+128) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (x / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 7.5e+128) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 7.5e+128: tmp = a * 120.0 else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 7.5e+128) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(x / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= 7.5e+128) tmp = a * 120.0; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 7.5e+128], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 7.5 \cdot 10^{+128}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if x < 7.50000000000000076e128Initial program 98.9%
Taylor expanded in z around inf 55.4%
if 7.50000000000000076e128 < x Initial program 99.8%
*-commutative99.8%
associate-/l*99.7%
frac-2neg99.7%
distribute-frac-neg99.7%
div-inv99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
Applied egg-rr99.7%
+-commutative99.7%
unsub-neg99.7%
div-inv99.6%
*-commutative99.6%
associate-/r*99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in x around inf 72.3%
Taylor expanded in z around 0 49.0%
Final simplification54.2%
(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%
Taylor expanded in z around inf 50.3%
Final simplification50.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 2023332
(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)))