
(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 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (fma a 120.0 (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((60.0 / (z - t)) * (x - y)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)
\end{array}
Initial program 99.5%
+-commutative99.5%
fma-def99.5%
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))))
(if (<= t_1 -2e+28)
t_1
(if (<= t_1 500000.0) (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -2e+28) {
tmp = t_1;
} else if (t_1 <= 500000.0) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-2d+28)) then
tmp = t_1
else if (t_1 <= 500000.0d0) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -2e+28) {
tmp = t_1;
} else if (t_1 <= 500000.0) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -2e+28: tmp = t_1 elif t_1 <= 500000.0: tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -2e+28) tmp = t_1; elseif (t_1 <= 500000.0) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -2e+28) tmp = t_1; elseif (t_1 <= 500000.0) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+28], t$95$1, If[LessEqual[t$95$1, 500000.0], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq 500000:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -1.99999999999999992e28Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 77.4%
associate-*r/77.5%
Applied egg-rr77.5%
if -1.99999999999999992e28 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 5e5Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 74.8%
if 5e5 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 98.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 86.8%
Final simplification78.6%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -4e+159)
(+ (* a 120.0) (* x (/ 60.0 z)))
(if (<= (* a 120.0) -2e-67)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= (* a 120.0) 5e-7) (* (/ 60.0 (- z t)) (- x y)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -4e+159) {
tmp = (a * 120.0) + (x * (60.0 / z));
} else if ((a * 120.0) <= -2e-67) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 5e-7) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-4d+159)) then
tmp = (a * 120.0d0) + (x * (60.0d0 / z))
else if ((a * 120.0d0) <= (-2d-67)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((a * 120.0d0) <= 5d-7) then
tmp = (60.0d0 / (z - t)) * (x - y)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -4e+159) {
tmp = (a * 120.0) + (x * (60.0 / z));
} else if ((a * 120.0) <= -2e-67) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 5e-7) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -4e+159: tmp = (a * 120.0) + (x * (60.0 / z)) elif (a * 120.0) <= -2e-67: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (a * 120.0) <= 5e-7: tmp = (60.0 / (z - t)) * (x - y) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -4e+159) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / z))); elseif (Float64(a * 120.0) <= -2e-67) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (Float64(a * 120.0) <= 5e-7) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -4e+159) tmp = (a * 120.0) + (x * (60.0 / z)); elseif ((a * 120.0) <= -2e-67) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((a * 120.0) <= 5e-7) tmp = (60.0 / (z - t)) * (x - y); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e+159], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-67], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-7], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{+159}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z}\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-67}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -3.9999999999999997e159Initial program 96.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 93.9%
associate-*r/90.8%
associate-*l/93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in z around inf 84.9%
if -3.9999999999999997e159 < (*.f64 a 120) < -1.99999999999999989e-67Initial program 99.9%
Taylor expanded in x around 0 92.7%
Taylor expanded in t around 0 69.7%
if -1.99999999999999989e-67 < (*.f64 a 120) < 4.99999999999999977e-7Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.9%
expm1-log1p-u49.1%
expm1-udef29.9%
Applied egg-rr29.9%
expm1-def49.1%
expm1-log1p80.9%
associate-*r/81.0%
associate-*l/80.9%
*-commutative80.9%
Simplified80.9%
if 4.99999999999999977e-7 < (*.f64 a 120) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 75.3%
Final simplification78.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 x) z)) (t_2 (* -60.0 (/ (- x y) t))))
(if (<= a -1.16e-69)
(* a 120.0)
(if (<= a 3.6e-271)
t_2
(if (<= a 2.5e-137)
t_1
(if (<= a 7.5e-95)
t_2
(if (<= a 1.75e-50)
t_1
(if (<= a 2.7e-9) (/ -60.0 (/ t x)) (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * x) / z;
double t_2 = -60.0 * ((x - y) / t);
double tmp;
if (a <= -1.16e-69) {
tmp = a * 120.0;
} else if (a <= 3.6e-271) {
tmp = t_2;
} else if (a <= 2.5e-137) {
tmp = t_1;
} else if (a <= 7.5e-95) {
tmp = t_2;
} else if (a <= 1.75e-50) {
tmp = t_1;
} else if (a <= 2.7e-9) {
tmp = -60.0 / (t / x);
} 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) / z
t_2 = (-60.0d0) * ((x - y) / t)
if (a <= (-1.16d-69)) then
tmp = a * 120.0d0
else if (a <= 3.6d-271) then
tmp = t_2
else if (a <= 2.5d-137) then
tmp = t_1
else if (a <= 7.5d-95) then
tmp = t_2
else if (a <= 1.75d-50) then
tmp = t_1
else if (a <= 2.7d-9) then
tmp = (-60.0d0) / (t / x)
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;
double t_2 = -60.0 * ((x - y) / t);
double tmp;
if (a <= -1.16e-69) {
tmp = a * 120.0;
} else if (a <= 3.6e-271) {
tmp = t_2;
} else if (a <= 2.5e-137) {
tmp = t_1;
} else if (a <= 7.5e-95) {
tmp = t_2;
} else if (a <= 1.75e-50) {
tmp = t_1;
} else if (a <= 2.7e-9) {
tmp = -60.0 / (t / x);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * x) / z t_2 = -60.0 * ((x - y) / t) tmp = 0 if a <= -1.16e-69: tmp = a * 120.0 elif a <= 3.6e-271: tmp = t_2 elif a <= 2.5e-137: tmp = t_1 elif a <= 7.5e-95: tmp = t_2 elif a <= 1.75e-50: tmp = t_1 elif a <= 2.7e-9: tmp = -60.0 / (t / x) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * x) / z) t_2 = Float64(-60.0 * Float64(Float64(x - y) / t)) tmp = 0.0 if (a <= -1.16e-69) tmp = Float64(a * 120.0); elseif (a <= 3.6e-271) tmp = t_2; elseif (a <= 2.5e-137) tmp = t_1; elseif (a <= 7.5e-95) tmp = t_2; elseif (a <= 1.75e-50) tmp = t_1; elseif (a <= 2.7e-9) tmp = Float64(-60.0 / Float64(t / x)); 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_2 = -60.0 * ((x - y) / t); tmp = 0.0; if (a <= -1.16e-69) tmp = a * 120.0; elseif (a <= 3.6e-271) tmp = t_2; elseif (a <= 2.5e-137) tmp = t_1; elseif (a <= 7.5e-95) tmp = t_2; elseif (a <= 1.75e-50) tmp = t_1; elseif (a <= 2.7e-9) tmp = -60.0 / (t / x); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * x), $MachinePrecision] / z), $MachinePrecision]}, Block[{t$95$2 = N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.16e-69], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 3.6e-271], t$95$2, If[LessEqual[a, 2.5e-137], t$95$1, If[LessEqual[a, 7.5e-95], t$95$2, If[LessEqual[a, 1.75e-50], t$95$1, If[LessEqual[a, 2.7e-9], N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot x}{z}\\
t_2 := -60 \cdot \frac{x - y}{t}\\
\mathbf{if}\;a \leq -1.16 \cdot 10^{-69}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{-271}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{-137}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{-95}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{-50}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{-9}:\\
\;\;\;\;\frac{-60}{\frac{t}{x}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.15999999999999989e-69 or 2.7000000000000002e-9 < a Initial program 99.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 70.2%
if -1.15999999999999989e-69 < a < 3.5999999999999998e-271 or 2.5e-137 < a < 7.5000000000000003e-95Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 86.2%
Taylor expanded in z around 0 56.4%
if 3.5999999999999998e-271 < a < 2.5e-137 or 7.5000000000000003e-95 < a < 1.74999999999999998e-50Initial program 100.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 68.8%
Taylor expanded in z around inf 63.4%
associate-*r/63.5%
Simplified63.5%
Taylor expanded in x around inf 47.9%
*-commutative47.9%
Simplified47.9%
if 1.74999999999999998e-50 < a < 2.7000000000000002e-9Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 83.1%
Taylor expanded in x around inf 60.1%
Taylor expanded in z around 0 60.2%
associate-*r/60.1%
associate-/l*60.2%
Simplified60.2%
Final simplification62.4%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -2e-67) (+ (* a 120.0) (* -60.0 (/ y z))) (if (<= (* a 120.0) 5e-7) (* (/ 60.0 (- z t)) (- x y)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-67) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 5e-7) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-2d-67)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((a * 120.0d0) <= 5d-7) then
tmp = (60.0d0 / (z - t)) * (x - y)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-67) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 5e-7) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e-67: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (a * 120.0) <= 5e-7: tmp = (60.0 / (z - t)) * (x - y) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e-67) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (Float64(a * 120.0) <= 5e-7) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e-67) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((a * 120.0) <= 5e-7) tmp = (60.0 / (z - t)) * (x - y); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-67], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-7], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-67}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-7}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1.99999999999999989e-67Initial program 98.5%
Taylor expanded in x around 0 84.9%
Taylor expanded in t around 0 67.9%
if -1.99999999999999989e-67 < (*.f64 a 120) < 4.99999999999999977e-7Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.9%
expm1-log1p-u49.1%
expm1-udef29.9%
Applied egg-rr29.9%
expm1-def49.1%
expm1-log1p80.9%
associate-*r/81.0%
associate-*l/80.9%
*-commutative80.9%
Simplified80.9%
if 4.99999999999999977e-7 < (*.f64 a 120) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 75.3%
Final simplification76.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -8.6e+103) (not (<= y 6.2e+116))) (/ (* 60.0 (- x y)) (- z t)) (+ (* (/ 60.0 (- z t)) x) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -8.6e+103) || !(y <= 6.2e+116)) {
tmp = (60.0 * (x - y)) / (z - t);
} else {
tmp = ((60.0 / (z - t)) * x) + (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 <= (-8.6d+103)) .or. (.not. (y <= 6.2d+116))) then
tmp = (60.0d0 * (x - y)) / (z - t)
else
tmp = ((60.0d0 / (z - t)) * x) + (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 <= -8.6e+103) || !(y <= 6.2e+116)) {
tmp = (60.0 * (x - y)) / (z - t);
} else {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -8.6e+103) or not (y <= 6.2e+116): tmp = (60.0 * (x - y)) / (z - t) else: tmp = ((60.0 / (z - t)) * x) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -8.6e+103) || !(y <= 6.2e+116)) tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); else tmp = Float64(Float64(Float64(60.0 / Float64(z - t)) * x) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -8.6e+103) || ~((y <= 6.2e+116))) tmp = (60.0 * (x - y)) / (z - t); else tmp = ((60.0 / (z - t)) * x) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -8.6e+103], N[Not[LessEqual[y, 6.2e+116]], $MachinePrecision]], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{+103} \lor \neg \left(y \leq 6.2 \cdot 10^{+116}\right):\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\
\end{array}
\end{array}
if y < -8.59999999999999938e103 or 6.19999999999999992e116 < y Initial program 99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.4%
associate-*r/81.6%
Applied egg-rr81.6%
if -8.59999999999999938e103 < y < 6.19999999999999992e116Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 90.2%
associate-*r/89.6%
associate-*l/90.2%
*-commutative90.2%
Simplified90.2%
Final simplification87.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.6e+50) (not (<= x 2.15e-38))) (+ (* (/ 60.0 (- z t)) x) (* a 120.0)) (+ (/ -60.0 (/ (- z t) y)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.6e+50) || !(x <= 2.15e-38)) {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
} else {
tmp = (-60.0 / ((z - t) / y)) + (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 <= (-1.6d+50)) .or. (.not. (x <= 2.15d-38))) then
tmp = ((60.0d0 / (z - t)) * x) + (a * 120.0d0)
else
tmp = ((-60.0d0) / ((z - t) / y)) + (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 <= -1.6e+50) || !(x <= 2.15e-38)) {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
} else {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.6e+50) or not (x <= 2.15e-38): tmp = ((60.0 / (z - t)) * x) + (a * 120.0) else: tmp = (-60.0 / ((z - t) / y)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.6e+50) || !(x <= 2.15e-38)) tmp = Float64(Float64(Float64(60.0 / Float64(z - t)) * x) + Float64(a * 120.0)); else tmp = Float64(Float64(-60.0 / Float64(Float64(z - t) / y)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.6e+50) || ~((x <= 2.15e-38))) tmp = ((60.0 / (z - t)) * x) + (a * 120.0); else tmp = (-60.0 / ((z - t) / y)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.6e+50], N[Not[LessEqual[x, 2.15e-38]], $MachinePrecision]], N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.6 \cdot 10^{+50} \lor \neg \left(x \leq 2.15 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\
\end{array}
\end{array}
if x < -1.59999999999999991e50 or 2.1500000000000001e-38 < x Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 88.0%
associate-*r/87.4%
associate-*l/88.0%
*-commutative88.0%
Simplified88.0%
if -1.59999999999999991e50 < x < 2.1500000000000001e-38Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 96.9%
associate-*r/96.9%
associate-/l*96.9%
Simplified96.9%
Final simplification92.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -8.4e+40) (not (<= x 2.35e-38))) (+ (* (/ 60.0 (- z t)) x) (* a 120.0)) (+ (/ (* y -60.0) (- z t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -8.4e+40) || !(x <= 2.35e-38)) {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-8.4d+40)) .or. (.not. (x <= 2.35d-38))) then
tmp = ((60.0d0 / (z - t)) * x) + (a * 120.0d0)
else
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -8.4e+40) || !(x <= 2.35e-38)) {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -8.4e+40) or not (x <= 2.35e-38): tmp = ((60.0 / (z - t)) * x) + (a * 120.0) else: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -8.4e+40) || !(x <= 2.35e-38)) tmp = Float64(Float64(Float64(60.0 / Float64(z - t)) * x) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -8.4e+40) || ~((x <= 2.35e-38))) tmp = ((60.0 / (z - t)) * x) + (a * 120.0); else tmp = ((y * -60.0) / (z - t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -8.4e+40], N[Not[LessEqual[x, 2.35e-38]], $MachinePrecision]], N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.4 \cdot 10^{+40} \lor \neg \left(x \leq 2.35 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -8.4000000000000004e40 or 2.34999999999999999e-38 < x Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 88.0%
associate-*r/87.4%
associate-*l/88.0%
*-commutative88.0%
Simplified88.0%
if -8.4000000000000004e40 < x < 2.34999999999999999e-38Initial program 99.9%
Taylor expanded in x around 0 96.9%
Final simplification92.4%
(FPCore (x y z t a) :precision binary64 (if (<= (- x y) -1e+129) (* 60.0 (/ x (- z t))) (if (<= (- x y) 4e+97) (* a 120.0) (* 60.0 (/ (- x y) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x - y) <= -1e+129) {
tmp = 60.0 * (x / (z - t));
} else if ((x - y) <= 4e+97) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / z);
}
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 - y) <= (-1d+129)) then
tmp = 60.0d0 * (x / (z - t))
else if ((x - y) <= 4d+97) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x - y) <= -1e+129) {
tmp = 60.0 * (x / (z - t));
} else if ((x - y) <= 4e+97) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x - y) <= -1e+129: tmp = 60.0 * (x / (z - t)) elif (x - y) <= 4e+97: tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x - y) <= -1e+129) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (Float64(x - y) <= 4e+97) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x - y) <= -1e+129) tmp = 60.0 * (x / (z - t)); elseif ((x - y) <= 4e+97) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x - y), $MachinePrecision], -1e+129], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], 4e+97], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -1 \cdot 10^{+129}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;x - y \leq 4 \cdot 10^{+97}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\end{array}
\end{array}
if (-.f64 x y) < -1e129Initial program 98.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 73.2%
Taylor expanded in x around inf 46.5%
if -1e129 < (-.f64 x y) < 4.0000000000000003e97Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 70.2%
if 4.0000000000000003e97 < (-.f64 x y) Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.2%
Taylor expanded in z around inf 56.8%
Final simplification60.4%
(FPCore (x y z t a) :precision binary64 (if (<= (- x y) -1e+129) (* 60.0 (/ x (- z t))) (if (<= (- x y) 4e+97) (* a 120.0) (/ (* 60.0 (- x y)) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x - y) <= -1e+129) {
tmp = 60.0 * (x / (z - t));
} else if ((x - y) <= 4e+97) {
tmp = a * 120.0;
} else {
tmp = (60.0 * (x - y)) / z;
}
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 - y) <= (-1d+129)) then
tmp = 60.0d0 * (x / (z - t))
else if ((x - y) <= 4d+97) then
tmp = a * 120.0d0
else
tmp = (60.0d0 * (x - y)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x - y) <= -1e+129) {
tmp = 60.0 * (x / (z - t));
} else if ((x - y) <= 4e+97) {
tmp = a * 120.0;
} else {
tmp = (60.0 * (x - y)) / z;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x - y) <= -1e+129: tmp = 60.0 * (x / (z - t)) elif (x - y) <= 4e+97: tmp = a * 120.0 else: tmp = (60.0 * (x - y)) / z return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x - y) <= -1e+129) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (Float64(x - y) <= 4e+97) tmp = Float64(a * 120.0); else tmp = Float64(Float64(60.0 * Float64(x - y)) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x - y) <= -1e+129) tmp = 60.0 * (x / (z - t)); elseif ((x - y) <= 4e+97) tmp = a * 120.0; else tmp = (60.0 * (x - y)) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x - y), $MachinePrecision], -1e+129], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], 4e+97], N[(a * 120.0), $MachinePrecision], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -1 \cdot 10^{+129}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;x - y \leq 4 \cdot 10^{+97}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z}\\
\end{array}
\end{array}
if (-.f64 x y) < -1e129Initial program 98.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 73.2%
Taylor expanded in x around inf 46.5%
if -1e129 < (-.f64 x y) < 4.0000000000000003e97Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 70.2%
if 4.0000000000000003e97 < (-.f64 x y) Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.2%
Taylor expanded in z around inf 56.8%
associate-*r/56.8%
Simplified56.8%
Final simplification60.4%
(FPCore (x y z t a)
:precision binary64
(if (<= x -1.6e+46)
(+ (* (/ 60.0 (- z t)) x) (* a 120.0))
(if (<= x 2.35e-38)
(+ (/ (* y -60.0) (- z t)) (* a 120.0))
(+ (/ (* 60.0 x) (- z t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.6e+46) {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
} else if (x <= 2.35e-38) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = ((60.0 * x) / (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 <= (-1.6d+46)) then
tmp = ((60.0d0 / (z - t)) * x) + (a * 120.0d0)
else if (x <= 2.35d-38) then
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
else
tmp = ((60.0d0 * x) / (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 <= -1.6e+46) {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
} else if (x <= 2.35e-38) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = ((60.0 * x) / (z - t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.6e+46: tmp = ((60.0 / (z - t)) * x) + (a * 120.0) elif x <= 2.35e-38: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) else: tmp = ((60.0 * x) / (z - t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.6e+46) tmp = Float64(Float64(Float64(60.0 / Float64(z - t)) * x) + Float64(a * 120.0)); elseif (x <= 2.35e-38) tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(60.0 * x) / 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 <= -1.6e+46) tmp = ((60.0 / (z - t)) * x) + (a * 120.0); elseif (x <= 2.35e-38) tmp = ((y * -60.0) / (z - t)) + (a * 120.0); else tmp = ((60.0 * x) / (z - t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.6e+46], N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.35e-38], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.6 \cdot 10^{+46}:\\
\;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\
\mathbf{elif}\;x \leq 2.35 \cdot 10^{-38}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot x}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -1.5999999999999999e46Initial program 98.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 86.0%
associate-*r/84.5%
associate-*l/86.1%
*-commutative86.1%
Simplified86.1%
if -1.5999999999999999e46 < x < 2.34999999999999999e-38Initial program 99.9%
Taylor expanded in x around 0 96.9%
if 2.34999999999999999e-38 < x Initial program 99.7%
Taylor expanded in x around inf 89.5%
*-commutative41.9%
Simplified89.5%
Final simplification92.4%
(FPCore (x y z t a)
:precision binary64
(if (<= a -5.2e-72)
(* a 120.0)
(if (<= a 1.55e-301)
(* -60.0 (/ (- x y) t))
(if (<= a 2.7e-9) (* 60.0 (/ x (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.2e-72) {
tmp = a * 120.0;
} else if (a <= 1.55e-301) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 2.7e-9) {
tmp = 60.0 * (x / (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 <= (-5.2d-72)) then
tmp = a * 120.0d0
else if (a <= 1.55d-301) then
tmp = (-60.0d0) * ((x - y) / t)
else if (a <= 2.7d-9) then
tmp = 60.0d0 * (x / (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 <= -5.2e-72) {
tmp = a * 120.0;
} else if (a <= 1.55e-301) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 2.7e-9) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.2e-72: tmp = a * 120.0 elif a <= 1.55e-301: tmp = -60.0 * ((x - y) / t) elif a <= 2.7e-9: tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.2e-72) tmp = Float64(a * 120.0); elseif (a <= 1.55e-301) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); elseif (a <= 2.7e-9) tmp = Float64(60.0 * Float64(x / 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 <= -5.2e-72) tmp = a * 120.0; elseif (a <= 1.55e-301) tmp = -60.0 * ((x - y) / t); elseif (a <= 2.7e-9) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.2e-72], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.55e-301], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.7e-9], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.2 \cdot 10^{-72}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{-301}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{-9}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -5.19999999999999992e-72 or 2.7000000000000002e-9 < a Initial program 99.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 70.2%
if -5.19999999999999992e-72 < a < 1.55000000000000007e-301Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 84.8%
Taylor expanded in z around 0 58.0%
if 1.55000000000000007e-301 < a < 2.7000000000000002e-9Initial program 99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 77.9%
Taylor expanded in x around inf 51.7%
Final simplification62.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.2e-70) (not (<= a 6.8e-9))) (* 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 <= -5.2e-70) || !(a <= 6.8e-9)) {
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 <= (-5.2d-70)) .or. (.not. (a <= 6.8d-9))) 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 <= -5.2e-70) || !(a <= 6.8e-9)) {
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 <= -5.2e-70) or not (a <= 6.8e-9): 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 ((a <= -5.2e-70) || !(a <= 6.8e-9)) 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 <= -5.2e-70) || ~((a <= 6.8e-9))) 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[a, -5.2e-70], N[Not[LessEqual[a, 6.8e-9]], $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 \leq -5.2 \cdot 10^{-70} \lor \neg \left(a \leq 6.8 \cdot 10^{-9}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -5.20000000000000004e-70 or 6.7999999999999997e-9 < a Initial program 99.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 70.2%
if -5.20000000000000004e-70 < a < 6.7999999999999997e-9Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.9%
Final simplification75.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -2e-69) (* a 120.0) (if (<= a 7.5e-9) (* (/ 60.0 (- z t)) (- x y)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2e-69) {
tmp = a * 120.0;
} else if (a <= 7.5e-9) {
tmp = (60.0 / (z - t)) * (x - y);
} 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 <= (-2d-69)) then
tmp = a * 120.0d0
else if (a <= 7.5d-9) then
tmp = (60.0d0 / (z - t)) * (x - y)
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 <= -2e-69) {
tmp = a * 120.0;
} else if (a <= 7.5e-9) {
tmp = (60.0 / (z - t)) * (x - y);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2e-69: tmp = a * 120.0 elif a <= 7.5e-9: tmp = (60.0 / (z - t)) * (x - y) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2e-69) tmp = Float64(a * 120.0); elseif (a <= 7.5e-9) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2e-69) tmp = a * 120.0; elseif (a <= 7.5e-9) tmp = (60.0 / (z - t)) * (x - y); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2e-69], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 7.5e-9], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-69}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{-9}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.9999999999999999e-69 or 7.49999999999999933e-9 < a Initial program 99.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 70.2%
if -1.9999999999999999e-69 < a < 7.49999999999999933e-9Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.9%
expm1-log1p-u49.1%
expm1-udef29.9%
Applied egg-rr29.9%
expm1-def49.1%
expm1-log1p80.9%
associate-*r/81.0%
associate-*l/80.9%
*-commutative80.9%
Simplified80.9%
Final simplification75.5%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
Initial program 99.5%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.02e+176) (not (<= x 4.2e+262))) (* -60.0 (/ x t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.02e+176) || !(x <= 4.2e+262)) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-1.02d+176)) .or. (.not. (x <= 4.2d+262))) then
tmp = (-60.0d0) * (x / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.02e+176) || !(x <= 4.2e+262)) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.02e+176) or not (x <= 4.2e+262): tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.02e+176) || !(x <= 4.2e+262)) tmp = Float64(-60.0 * Float64(x / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.02e+176) || ~((x <= 4.2e+262))) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.02e+176], N[Not[LessEqual[x, 4.2e+262]], $MachinePrecision]], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.02 \cdot 10^{+176} \lor \neg \left(x \leq 4.2 \cdot 10^{+262}\right):\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.02000000000000001e176 or 4.19999999999999979e262 < x Initial program 97.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 84.5%
Taylor expanded in x around inf 77.9%
Taylor expanded in z around 0 52.6%
if -1.02000000000000001e176 < x < 4.19999999999999979e262Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 52.0%
Final simplification52.1%
(FPCore (x y z t a) :precision binary64 (if (<= x -2.8e+178) (* -60.0 (/ x t)) (if (<= x 4.5e+243) (* a 120.0) (* 60.0 (/ x z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.8e+178) {
tmp = -60.0 * (x / t);
} else if (x <= 4.5e+243) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
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 <= (-2.8d+178)) then
tmp = (-60.0d0) * (x / t)
else if (x <= 4.5d+243) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.8e+178) {
tmp = -60.0 * (x / t);
} else if (x <= 4.5e+243) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2.8e+178: tmp = -60.0 * (x / t) elif x <= 4.5e+243: tmp = a * 120.0 else: tmp = 60.0 * (x / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.8e+178) tmp = Float64(-60.0 * Float64(x / t)); elseif (x <= 4.5e+243) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -2.8e+178) tmp = -60.0 * (x / t); elseif (x <= 4.5e+243) tmp = a * 120.0; else tmp = 60.0 * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.8e+178], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e+243], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.8 \cdot 10^{+178}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+243}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if x < -2.79999999999999993e178Initial program 97.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 79.5%
Taylor expanded in x around inf 70.8%
Taylor expanded in z around 0 51.9%
if -2.79999999999999993e178 < x < 4.5e243Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 52.8%
if 4.5e243 < x Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 93.7%
Taylor expanded in x around inf 93.7%
Taylor expanded in z around inf 81.7%
Final simplification54.5%
(FPCore (x y z t a) :precision binary64 (if (<= x -5e+176) (/ -60.0 (/ t x)) (if (<= x 4.1e+243) (* a 120.0) (* 60.0 (/ x z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5e+176) {
tmp = -60.0 / (t / x);
} else if (x <= 4.1e+243) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
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 <= (-5d+176)) then
tmp = (-60.0d0) / (t / x)
else if (x <= 4.1d+243) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5e+176) {
tmp = -60.0 / (t / x);
} else if (x <= 4.1e+243) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -5e+176: tmp = -60.0 / (t / x) elif x <= 4.1e+243: tmp = a * 120.0 else: tmp = 60.0 * (x / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -5e+176) tmp = Float64(-60.0 / Float64(t / x)); elseif (x <= 4.1e+243) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -5e+176) tmp = -60.0 / (t / x); elseif (x <= 4.1e+243) tmp = a * 120.0; else tmp = 60.0 * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -5e+176], N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.1e+243], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{+176}:\\
\;\;\;\;\frac{-60}{\frac{t}{x}}\\
\mathbf{elif}\;x \leq 4.1 \cdot 10^{+243}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if x < -5e176Initial program 97.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 79.5%
Taylor expanded in x around inf 70.8%
Taylor expanded in z around 0 51.9%
associate-*r/51.9%
associate-/l*51.9%
Simplified51.9%
if -5e176 < x < 4.10000000000000008e243Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 52.8%
if 4.10000000000000008e243 < x Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 93.7%
Taylor expanded in x around inf 93.7%
Taylor expanded in z around inf 81.7%
Final simplification54.5%
(FPCore (x y z t a) :precision binary64 (if (<= x -4.3e+180) (/ -60.0 (/ t x)) (if (<= x 4.5e+243) (* a 120.0) (/ (* 60.0 x) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.3e+180) {
tmp = -60.0 / (t / x);
} else if (x <= 4.5e+243) {
tmp = a * 120.0;
} else {
tmp = (60.0 * x) / z;
}
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 <= (-4.3d+180)) then
tmp = (-60.0d0) / (t / x)
else if (x <= 4.5d+243) then
tmp = a * 120.0d0
else
tmp = (60.0d0 * x) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.3e+180) {
tmp = -60.0 / (t / x);
} else if (x <= 4.5e+243) {
tmp = a * 120.0;
} else {
tmp = (60.0 * x) / z;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4.3e+180: tmp = -60.0 / (t / x) elif x <= 4.5e+243: tmp = a * 120.0 else: tmp = (60.0 * x) / z return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4.3e+180) tmp = Float64(-60.0 / Float64(t / x)); elseif (x <= 4.5e+243) tmp = Float64(a * 120.0); else tmp = Float64(Float64(60.0 * x) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -4.3e+180) tmp = -60.0 / (t / x); elseif (x <= 4.5e+243) tmp = a * 120.0; else tmp = (60.0 * x) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4.3e+180], N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e+243], N[(a * 120.0), $MachinePrecision], N[(N[(60.0 * x), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.3 \cdot 10^{+180}:\\
\;\;\;\;\frac{-60}{\frac{t}{x}}\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+243}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot x}{z}\\
\end{array}
\end{array}
if x < -4.2999999999999999e180Initial program 97.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 79.5%
Taylor expanded in x around inf 70.8%
Taylor expanded in z around 0 51.9%
associate-*r/51.9%
associate-/l*51.9%
Simplified51.9%
if -4.2999999999999999e180 < x < 4.5e243Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 52.8%
if 4.5e243 < x Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 93.7%
Taylor expanded in z around inf 81.7%
associate-*r/81.8%
Simplified81.8%
Taylor expanded in x around inf 81.8%
*-commutative81.8%
Simplified81.8%
Final simplification54.5%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 45.7%
Final simplification45.7%
(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 2023214
(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)))