
(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(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.7%
+-commutative99.7%
fma-def99.8%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (fma 60.0 (/ (- x y) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return fma(60.0, ((x - y) / (z - t)), (a * 120.0));
}
function code(x, y, z, t, a) return fma(60.0, Float64(Float64(x - y) / Float64(z - t)), Float64(a * 120.0)) end
code[x_, y_, z_, t_, a_] := N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)
\end{array}
Initial program 99.7%
associate-*r/99.8%
fma-def99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (/ x (* t -0.016666666666666666)))))
(if (<= (* a 120.0) -4e+141)
(* a 120.0)
(if (<= (* a 120.0) -1e-6)
t_1
(if (<= (* a 120.0) 1e-46)
(* 60.0 (/ (- x y) (- z t)))
(if (<= (* a 120.0) 1e+85)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= (* a 120.0) 2e+93) (* 60.0 (/ x (- z t))) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (x / (t * -0.016666666666666666));
double tmp;
if ((a * 120.0) <= -4e+141) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-6) {
tmp = t_1;
} else if ((a * 120.0) <= 1e-46) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 1e+85) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 2e+93) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (a * 120.0d0) + (x / (t * (-0.016666666666666666d0)))
if ((a * 120.0d0) <= (-4d+141)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-1d-6)) then
tmp = t_1
else if ((a * 120.0d0) <= 1d-46) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if ((a * 120.0d0) <= 1d+85) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((a * 120.0d0) <= 2d+93) then
tmp = 60.0d0 * (x / (z - t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (x / (t * -0.016666666666666666));
double tmp;
if ((a * 120.0) <= -4e+141) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-6) {
tmp = t_1;
} else if ((a * 120.0) <= 1e-46) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 1e+85) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 2e+93) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (x / (t * -0.016666666666666666)) tmp = 0 if (a * 120.0) <= -4e+141: tmp = a * 120.0 elif (a * 120.0) <= -1e-6: tmp = t_1 elif (a * 120.0) <= 1e-46: tmp = 60.0 * ((x - y) / (z - t)) elif (a * 120.0) <= 1e+85: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (a * 120.0) <= 2e+93: tmp = 60.0 * (x / (z - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(x / Float64(t * -0.016666666666666666))) tmp = 0.0 if (Float64(a * 120.0) <= -4e+141) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -1e-6) tmp = t_1; elseif (Float64(a * 120.0) <= 1e-46) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (Float64(a * 120.0) <= 1e+85) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (Float64(a * 120.0) <= 2e+93) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (x / (t * -0.016666666666666666)); tmp = 0.0; if ((a * 120.0) <= -4e+141) tmp = a * 120.0; elseif ((a * 120.0) <= -1e-6) tmp = t_1; elseif ((a * 120.0) <= 1e-46) tmp = 60.0 * ((x - y) / (z - t)); elseif ((a * 120.0) <= 1e+85) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((a * 120.0) <= 2e+93) tmp = 60.0 * (x / (z - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(t * -0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e+141], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-6], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-46], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+85], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+93], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + \frac{x}{t \cdot -0.016666666666666666}\\
\mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{+141}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-6}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-46}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{+85}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+93}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.00000000000000007e141Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 93.7%
if -4.00000000000000007e141 < (*.f64 a 120) < -9.99999999999999955e-7 or 2.00000000000000009e93 < (*.f64 a 120) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 92.6%
associate-*r/92.5%
*-commutative92.5%
associate-/l*92.6%
Simplified92.6%
Taylor expanded in z around 0 82.7%
*-commutative82.7%
Simplified82.7%
if -9.99999999999999955e-7 < (*.f64 a 120) < 1.00000000000000002e-46Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 82.5%
if 1.00000000000000002e-46 < (*.f64 a 120) < 1e85Initial program 99.9%
Taylor expanded in x around 0 85.9%
Taylor expanded in t around 0 68.6%
if 1e85 < (*.f64 a 120) < 2.00000000000000009e93Initial program 99.5%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in a around 0 99.5%
Taylor expanded in x around inf 99.5%
Final simplification82.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (/ x (* t -0.016666666666666666)))))
(if (<= (* a 120.0) -4e+141)
(* a 120.0)
(if (<= (* a 120.0) -1e-6)
t_1
(if (<= (* a 120.0) 1e-46)
(* 60.0 (/ (- x y) (- z t)))
(if (<= (* a 120.0) 1e+85)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= (* a 120.0) 2e+111)
t_1
(+ (* a 120.0) (/ x (* z 0.016666666666666666))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (x / (t * -0.016666666666666666));
double tmp;
if ((a * 120.0) <= -4e+141) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-6) {
tmp = t_1;
} else if ((a * 120.0) <= 1e-46) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 1e+85) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 2e+111) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
}
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 = (a * 120.0d0) + (x / (t * (-0.016666666666666666d0)))
if ((a * 120.0d0) <= (-4d+141)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-1d-6)) then
tmp = t_1
else if ((a * 120.0d0) <= 1d-46) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if ((a * 120.0d0) <= 1d+85) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if ((a * 120.0d0) <= 2d+111) then
tmp = t_1
else
tmp = (a * 120.0d0) + (x / (z * 0.016666666666666666d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (x / (t * -0.016666666666666666));
double tmp;
if ((a * 120.0) <= -4e+141) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-6) {
tmp = t_1;
} else if ((a * 120.0) <= 1e-46) {
tmp = 60.0 * ((x - y) / (z - t));
} else if ((a * 120.0) <= 1e+85) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if ((a * 120.0) <= 2e+111) {
tmp = t_1;
} else {
tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (x / (t * -0.016666666666666666)) tmp = 0 if (a * 120.0) <= -4e+141: tmp = a * 120.0 elif (a * 120.0) <= -1e-6: tmp = t_1 elif (a * 120.0) <= 1e-46: tmp = 60.0 * ((x - y) / (z - t)) elif (a * 120.0) <= 1e+85: tmp = (a * 120.0) + (-60.0 * (y / z)) elif (a * 120.0) <= 2e+111: tmp = t_1 else: tmp = (a * 120.0) + (x / (z * 0.016666666666666666)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(x / Float64(t * -0.016666666666666666))) tmp = 0.0 if (Float64(a * 120.0) <= -4e+141) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -1e-6) tmp = t_1; elseif (Float64(a * 120.0) <= 1e-46) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (Float64(a * 120.0) <= 1e+85) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (Float64(a * 120.0) <= 2e+111) tmp = t_1; else tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(z * 0.016666666666666666))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (x / (t * -0.016666666666666666)); tmp = 0.0; if ((a * 120.0) <= -4e+141) tmp = a * 120.0; elseif ((a * 120.0) <= -1e-6) tmp = t_1; elseif ((a * 120.0) <= 1e-46) tmp = 60.0 * ((x - y) / (z - t)); elseif ((a * 120.0) <= 1e+85) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif ((a * 120.0) <= 2e+111) tmp = t_1; else tmp = (a * 120.0) + (x / (z * 0.016666666666666666)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(t * -0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -4e+141], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-6], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-46], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+85], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+111], t$95$1, N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(z * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + \frac{x}{t \cdot -0.016666666666666666}\\
\mathbf{if}\;a \cdot 120 \leq -4 \cdot 10^{+141}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-6}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-46}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{+85}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+111}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.00000000000000007e141Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 93.7%
if -4.00000000000000007e141 < (*.f64 a 120) < -9.99999999999999955e-7 or 1e85 < (*.f64 a 120) < 1.99999999999999991e111Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 91.3%
associate-*r/91.2%
*-commutative91.2%
associate-/l*91.4%
Simplified91.4%
Taylor expanded in z around 0 78.3%
*-commutative78.3%
Simplified78.3%
if -9.99999999999999955e-7 < (*.f64 a 120) < 1.00000000000000002e-46Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 82.5%
if 1.00000000000000002e-46 < (*.f64 a 120) < 1e85Initial program 99.9%
Taylor expanded in x around 0 85.9%
Taylor expanded in t around 0 68.6%
if 1.99999999999999991e111 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 94.0%
associate-*r/94.0%
*-commutative94.0%
associate-/l*94.1%
Simplified94.1%
Taylor expanded in z around inf 87.7%
*-commutative87.7%
Simplified87.7%
Final simplification82.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ x (- z t)))) (t_2 (* -60.0 (/ y (- z t)))))
(if (<= a -1.25e-17)
(* a 120.0)
(if (<= a -2.3e-83)
t_2
(if (<= a -1.05e-157)
t_1
(if (<= a -1.75e-199)
t_2
(if (<= a -6e-300)
t_1
(if (<= a 1.28e-11) (* 60.0 (/ (- x y) z)) (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / (z - t));
double t_2 = -60.0 * (y / (z - t));
double tmp;
if (a <= -1.25e-17) {
tmp = a * 120.0;
} else if (a <= -2.3e-83) {
tmp = t_2;
} else if (a <= -1.05e-157) {
tmp = t_1;
} else if (a <= -1.75e-199) {
tmp = t_2;
} else if (a <= -6e-300) {
tmp = t_1;
} else if (a <= 1.28e-11) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 60.0d0 * (x / (z - t))
t_2 = (-60.0d0) * (y / (z - t))
if (a <= (-1.25d-17)) then
tmp = a * 120.0d0
else if (a <= (-2.3d-83)) then
tmp = t_2
else if (a <= (-1.05d-157)) then
tmp = t_1
else if (a <= (-1.75d-199)) then
tmp = t_2
else if (a <= (-6d-300)) then
tmp = t_1
else if (a <= 1.28d-11) then
tmp = 60.0d0 * ((x - y) / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / (z - t));
double t_2 = -60.0 * (y / (z - t));
double tmp;
if (a <= -1.25e-17) {
tmp = a * 120.0;
} else if (a <= -2.3e-83) {
tmp = t_2;
} else if (a <= -1.05e-157) {
tmp = t_1;
} else if (a <= -1.75e-199) {
tmp = t_2;
} else if (a <= -6e-300) {
tmp = t_1;
} else if (a <= 1.28e-11) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * (x / (z - t)) t_2 = -60.0 * (y / (z - t)) tmp = 0 if a <= -1.25e-17: tmp = a * 120.0 elif a <= -2.3e-83: tmp = t_2 elif a <= -1.05e-157: tmp = t_1 elif a <= -1.75e-199: tmp = t_2 elif a <= -6e-300: tmp = t_1 elif a <= 1.28e-11: tmp = 60.0 * ((x - y) / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(x / Float64(z - t))) t_2 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (a <= -1.25e-17) tmp = Float64(a * 120.0); elseif (a <= -2.3e-83) tmp = t_2; elseif (a <= -1.05e-157) tmp = t_1; elseif (a <= -1.75e-199) tmp = t_2; elseif (a <= -6e-300) tmp = t_1; elseif (a <= 1.28e-11) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); 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)); t_2 = -60.0 * (y / (z - t)); tmp = 0.0; if (a <= -1.25e-17) tmp = a * 120.0; elseif (a <= -2.3e-83) tmp = t_2; elseif (a <= -1.05e-157) tmp = t_1; elseif (a <= -1.75e-199) tmp = t_2; elseif (a <= -6e-300) tmp = t_1; elseif (a <= 1.28e-11) tmp = 60.0 * ((x - y) / z); 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]}, Block[{t$95$2 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.25e-17], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -2.3e-83], t$95$2, If[LessEqual[a, -1.05e-157], t$95$1, If[LessEqual[a, -1.75e-199], t$95$2, If[LessEqual[a, -6e-300], t$95$1, If[LessEqual[a, 1.28e-11], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x}{z - t}\\
t_2 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;a \leq -1.25 \cdot 10^{-17}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -2.3 \cdot 10^{-83}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -1.05 \cdot 10^{-157}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.75 \cdot 10^{-199}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -6 \cdot 10^{-300}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.28 \cdot 10^{-11}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.25e-17 or 1.28e-11 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 75.8%
if -1.25e-17 < a < -2.2999999999999999e-83 or -1.05e-157 < a < -1.7499999999999999e-199Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.0%
Taylor expanded in x around 0 62.2%
if -2.2999999999999999e-83 < a < -1.05e-157 or -1.7499999999999999e-199 < a < -6.00000000000000048e-300Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 85.6%
Taylor expanded in x around inf 64.1%
if -6.00000000000000048e-300 < a < 1.28e-11Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 79.7%
Taylor expanded in z around inf 53.1%
Final simplification66.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -2e-14) (not (<= (* a 120.0) 0.1))) (+ (* a 120.0) (* (/ 60.0 (- z t)) x)) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2e-14) || !((a * 120.0) <= 0.1)) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} 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) <= (-2d-14)) .or. (.not. ((a * 120.0d0) <= 0.1d0))) then
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
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) <= -2e-14) || !((a * 120.0) <= 0.1)) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -2e-14) or not ((a * 120.0) <= 0.1): tmp = (a * 120.0) + ((60.0 / (z - t)) * x) 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) <= -2e-14) || !(Float64(a * 120.0) <= 0.1)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); 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) <= -2e-14) || ~(((a * 120.0) <= 0.1))) tmp = (a * 120.0) + ((60.0 / (z - t)) * x); 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], -2e-14], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 0.1]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $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 -2 \cdot 10^{-14} \lor \neg \left(a \cdot 120 \leq 0.1\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -2e-14 or 0.10000000000000001 < (*.f64 a 120) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 91.0%
associate-*r/90.9%
associate-*l/91.0%
*-commutative91.0%
Simplified91.0%
if -2e-14 < (*.f64 a 120) < 0.10000000000000001Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.0%
Final simplification85.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ x (- z t)))))
(if (<= x -1.55e+147)
t_1
(if (<= x -9.5e-241)
(* a 120.0)
(if (<= x 1.18e-291)
(* -60.0 (/ y (- z t)))
(if (<= x 9e+154) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / (z - t));
double tmp;
if (x <= -1.55e+147) {
tmp = t_1;
} else if (x <= -9.5e-241) {
tmp = a * 120.0;
} else if (x <= 1.18e-291) {
tmp = -60.0 * (y / (z - t));
} else if (x <= 9e+154) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * (x / (z - t))
if (x <= (-1.55d+147)) then
tmp = t_1
else if (x <= (-9.5d-241)) then
tmp = a * 120.0d0
else if (x <= 1.18d-291) then
tmp = (-60.0d0) * (y / (z - t))
else if (x <= 9d+154) then
tmp = a * 120.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / (z - t));
double tmp;
if (x <= -1.55e+147) {
tmp = t_1;
} else if (x <= -9.5e-241) {
tmp = a * 120.0;
} else if (x <= 1.18e-291) {
tmp = -60.0 * (y / (z - t));
} else if (x <= 9e+154) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * (x / (z - t)) tmp = 0 if x <= -1.55e+147: tmp = t_1 elif x <= -9.5e-241: tmp = a * 120.0 elif x <= 1.18e-291: tmp = -60.0 * (y / (z - t)) elif x <= 9e+154: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(x / Float64(z - t))) tmp = 0.0 if (x <= -1.55e+147) tmp = t_1; elseif (x <= -9.5e-241) tmp = Float64(a * 120.0); elseif (x <= 1.18e-291) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (x <= 9e+154) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * (x / (z - t)); tmp = 0.0; if (x <= -1.55e+147) tmp = t_1; elseif (x <= -9.5e-241) tmp = a * 120.0; elseif (x <= 1.18e-291) tmp = -60.0 * (y / (z - t)); elseif (x <= 9e+154) tmp = a * 120.0; else tmp = t_1; 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[x, -1.55e+147], t$95$1, If[LessEqual[x, -9.5e-241], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, 1.18e-291], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9e+154], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x}{z - t}\\
\mathbf{if}\;x \leq -1.55 \cdot 10^{+147}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -9.5 \cdot 10^{-241}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x \leq 1.18 \cdot 10^{-291}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;x \leq 9 \cdot 10^{+154}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -1.55e147 or 9.00000000000000018e154 < x Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 75.4%
Taylor expanded in x around inf 65.4%
if -1.55e147 < x < -9.49999999999999971e-241 or 1.18e-291 < x < 9.00000000000000018e154Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.1%
if -9.49999999999999971e-241 < x < 1.18e-291Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 69.9%
Taylor expanded in x around 0 69.9%
Final simplification61.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -7.2e+45)
(* a 120.0)
(if (<= a 1.2e-48)
(* 60.0 (/ (- x y) (- z t)))
(if (<= a 9.5e+84)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= a 1.5e+91) (* 60.0 (/ x (- z t))) (* a 120.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.2e+45) {
tmp = a * 120.0;
} else if (a <= 1.2e-48) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (a <= 9.5e+84) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if (a <= 1.5e+91) {
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 <= (-7.2d+45)) then
tmp = a * 120.0d0
else if (a <= 1.2d-48) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (a <= 9.5d+84) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if (a <= 1.5d+91) 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 <= -7.2e+45) {
tmp = a * 120.0;
} else if (a <= 1.2e-48) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (a <= 9.5e+84) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if (a <= 1.5e+91) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7.2e+45: tmp = a * 120.0 elif a <= 1.2e-48: tmp = 60.0 * ((x - y) / (z - t)) elif a <= 9.5e+84: tmp = (a * 120.0) + (-60.0 * (y / z)) elif a <= 1.5e+91: 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 <= -7.2e+45) tmp = Float64(a * 120.0); elseif (a <= 1.2e-48) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (a <= 9.5e+84) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (a <= 1.5e+91) 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 <= -7.2e+45) tmp = a * 120.0; elseif (a <= 1.2e-48) tmp = 60.0 * ((x - y) / (z - t)); elseif (a <= 9.5e+84) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif (a <= 1.5e+91) 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, -7.2e+45], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.2e-48], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.5e+84], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.5e+91], 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 -7.2 \cdot 10^{+45}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{-48}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{+84}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{+91}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -7.2e45 or 1.50000000000000003e91 < a Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 84.3%
if -7.2e45 < a < 1.2e-48Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 80.6%
if 1.2e-48 < a < 9.49999999999999979e84Initial program 99.9%
Taylor expanded in x around 0 85.9%
Taylor expanded in t around 0 68.6%
if 9.49999999999999979e84 < a < 1.50000000000000003e91Initial program 99.5%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in a around 0 99.5%
Taylor expanded in x around inf 99.5%
Final simplification80.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.2e+36) (not (<= x 2.7e+25))) (+ (* a 120.0) (* (/ 60.0 (- z t)) x)) (+ (* a 120.0) (/ -60.0 (/ (- z t) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.2e+36) || !(x <= 2.7e+25)) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
}
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.2d+36)) .or. (.not. (x <= 2.7d+25))) then
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
else
tmp = (a * 120.0d0) + ((-60.0d0) / ((z - t) / y))
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.2e+36) || !(x <= 2.7e+25)) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.2e+36) or not (x <= 2.7e+25): tmp = (a * 120.0) + ((60.0 / (z - t)) * x) else: tmp = (a * 120.0) + (-60.0 / ((z - t) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.2e+36) || !(x <= 2.7e+25)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(Float64(z - t) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.2e+36) || ~((x <= 2.7e+25))) tmp = (a * 120.0) + ((60.0 / (z - t)) * x); else tmp = (a * 120.0) + (-60.0 / ((z - t) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.2e+36], N[Not[LessEqual[x, 2.7e+25]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{+36} \lor \neg \left(x \leq 2.7 \cdot 10^{+25}\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\
\end{array}
\end{array}
if x < -1.19999999999999996e36 or 2.7e25 < x Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 88.2%
associate-*r/88.1%
associate-*l/88.2%
*-commutative88.2%
Simplified88.2%
if -1.19999999999999996e36 < x < 2.7e25Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 95.6%
associate-*r/95.6%
associate-/l*95.5%
Simplified95.5%
Final simplification92.0%
(FPCore (x y z t a)
:precision binary64
(if (<= x -6.4e+35)
(+ (* a 120.0) (* (/ 60.0 (- z t)) x))
(if (<= x 1.3e+26)
(+ (* a 120.0) (/ -60.0 (/ (- z t) y)))
(+ (* a 120.0) (/ x (/ (- z t) 60.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6.4e+35) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else if (x <= 1.3e+26) {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
} else {
tmp = (a * 120.0) + (x / ((z - t) / 60.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-6.4d+35)) then
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
else if (x <= 1.3d+26) then
tmp = (a * 120.0d0) + ((-60.0d0) / ((z - t) / y))
else
tmp = (a * 120.0d0) + (x / ((z - t) / 60.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6.4e+35) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else if (x <= 1.3e+26) {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
} else {
tmp = (a * 120.0) + (x / ((z - t) / 60.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -6.4e+35: tmp = (a * 120.0) + ((60.0 / (z - t)) * x) elif x <= 1.3e+26: tmp = (a * 120.0) + (-60.0 / ((z - t) / y)) else: tmp = (a * 120.0) + (x / ((z - t) / 60.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -6.4e+35) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); elseif (x <= 1.3e+26) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(Float64(z - t) / y))); else tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(Float64(z - t) / 60.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -6.4e+35) tmp = (a * 120.0) + ((60.0 / (z - t)) * x); elseif (x <= 1.3e+26) tmp = (a * 120.0) + (-60.0 / ((z - t) / y)); else tmp = (a * 120.0) + (x / ((z - t) / 60.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -6.4e+35], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.3e+26], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.4 \cdot 10^{+35}:\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{+26}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x}{\frac{z - t}{60}}\\
\end{array}
\end{array}
if x < -6.39999999999999965e35Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 85.5%
associate-*r/85.4%
associate-*l/85.6%
*-commutative85.6%
Simplified85.6%
if -6.39999999999999965e35 < x < 1.30000000000000001e26Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 95.6%
associate-*r/95.6%
associate-/l*95.5%
Simplified95.5%
if 1.30000000000000001e26 < x Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 91.3%
associate-*r/91.3%
*-commutative91.3%
associate-/l*91.3%
Simplified91.3%
Final simplification92.0%
(FPCore (x y z t a)
:precision binary64
(if (<= x -4.8e+37)
(+ (* a 120.0) (* (/ 60.0 (- z t)) x))
(if (<= x 2.8e+16)
(+ (* a 120.0) (/ (* y -60.0) (- z t)))
(+ (* a 120.0) (/ x (/ (- z t) 60.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.8e+37) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else if (x <= 2.8e+16) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (x / ((z - t) / 60.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-4.8d+37)) then
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
else if (x <= 2.8d+16) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + (x / ((z - t) / 60.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.8e+37) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else if (x <= 2.8e+16) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (x / ((z - t) / 60.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4.8e+37: tmp = (a * 120.0) + ((60.0 / (z - t)) * x) elif x <= 2.8e+16: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + (x / ((z - t) / 60.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4.8e+37) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); elseif (x <= 2.8e+16) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(Float64(z - t) / 60.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -4.8e+37) tmp = (a * 120.0) + ((60.0 / (z - t)) * x); elseif (x <= 2.8e+16) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + (x / ((z - t) / 60.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4.8e+37], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e+16], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{+37}:\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+16}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x}{\frac{z - t}{60}}\\
\end{array}
\end{array}
if x < -4.8e37Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 85.5%
associate-*r/85.4%
associate-*l/85.6%
*-commutative85.6%
Simplified85.6%
if -4.8e37 < x < 2.8e16Initial program 99.8%
Taylor expanded in x around 0 95.6%
if 2.8e16 < x Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 91.3%
associate-*r/91.3%
*-commutative91.3%
associate-/l*91.3%
Simplified91.3%
Final simplification92.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.6e-17)
(* a 120.0)
(if (<= a -1.65e-202)
(* (- x y) (/ -60.0 t))
(if (<= a 2e-11) (* 60.0 (/ (- x y) z)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e-17) {
tmp = a * 120.0;
} else if (a <= -1.65e-202) {
tmp = (x - y) * (-60.0 / t);
} else if (a <= 2e-11) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.6d-17)) then
tmp = a * 120.0d0
else if (a <= (-1.65d-202)) then
tmp = (x - y) * ((-60.0d0) / t)
else if (a <= 2d-11) then
tmp = 60.0d0 * ((x - y) / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e-17) {
tmp = a * 120.0;
} else if (a <= -1.65e-202) {
tmp = (x - y) * (-60.0 / t);
} else if (a <= 2e-11) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.6e-17: tmp = a * 120.0 elif a <= -1.65e-202: tmp = (x - y) * (-60.0 / t) elif a <= 2e-11: tmp = 60.0 * ((x - y) / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.6e-17) tmp = Float64(a * 120.0); elseif (a <= -1.65e-202) tmp = Float64(Float64(x - y) * Float64(-60.0 / t)); elseif (a <= 2e-11) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.6e-17) tmp = a * 120.0; elseif (a <= -1.65e-202) tmp = (x - y) * (-60.0 / t); elseif (a <= 2e-11) tmp = 60.0 * ((x - y) / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.6e-17], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -1.65e-202], N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2e-11], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{-17}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.65 \cdot 10^{-202}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{elif}\;a \leq 2 \cdot 10^{-11}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.6000000000000001e-17 or 1.99999999999999988e-11 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 75.8%
if -1.6000000000000001e-17 < a < -1.64999999999999995e-202Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 77.1%
Taylor expanded in z around 0 52.4%
associate-*r/52.3%
associate-/l*52.3%
Simplified52.3%
associate-/r/52.5%
Applied egg-rr52.5%
if -1.64999999999999995e-202 < a < 1.99999999999999988e-11Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 83.0%
Taylor expanded in z around inf 54.8%
Final simplification64.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.08e-17)
(* a 120.0)
(if (<= a -2.25e-203)
(* (- x y) (/ -60.0 t))
(if (<= a 1e-11) (* (- x y) (/ 60.0 z)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.08e-17) {
tmp = a * 120.0;
} else if (a <= -2.25e-203) {
tmp = (x - y) * (-60.0 / t);
} else if (a <= 1e-11) {
tmp = (x - y) * (60.0 / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.08d-17)) then
tmp = a * 120.0d0
else if (a <= (-2.25d-203)) then
tmp = (x - y) * ((-60.0d0) / t)
else if (a <= 1d-11) then
tmp = (x - y) * (60.0d0 / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.08e-17) {
tmp = a * 120.0;
} else if (a <= -2.25e-203) {
tmp = (x - y) * (-60.0 / t);
} else if (a <= 1e-11) {
tmp = (x - y) * (60.0 / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.08e-17: tmp = a * 120.0 elif a <= -2.25e-203: tmp = (x - y) * (-60.0 / t) elif a <= 1e-11: tmp = (x - y) * (60.0 / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.08e-17) tmp = Float64(a * 120.0); elseif (a <= -2.25e-203) tmp = Float64(Float64(x - y) * Float64(-60.0 / t)); elseif (a <= 1e-11) tmp = Float64(Float64(x - y) * Float64(60.0 / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.08e-17) tmp = a * 120.0; elseif (a <= -2.25e-203) tmp = (x - y) * (-60.0 / t); elseif (a <= 1e-11) tmp = (x - y) * (60.0 / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.08e-17], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -2.25e-203], N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1e-11], N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.08 \cdot 10^{-17}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -2.25 \cdot 10^{-203}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{elif}\;a \leq 10^{-11}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{60}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.07999999999999995e-17 or 9.99999999999999939e-12 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 75.8%
if -1.07999999999999995e-17 < a < -2.2500000000000001e-203Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 77.1%
Taylor expanded in z around 0 52.4%
associate-*r/52.3%
associate-/l*52.3%
Simplified52.3%
associate-/r/52.5%
Applied egg-rr52.5%
if -2.2500000000000001e-203 < a < 9.99999999999999939e-12Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 83.0%
expm1-log1p-u54.3%
expm1-udef28.6%
Applied egg-rr28.6%
expm1-def54.3%
expm1-log1p83.0%
associate-*r/82.9%
associate-/l*82.9%
associate-/r/83.0%
Simplified83.0%
Taylor expanded in z around inf 54.8%
Final simplification64.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.3e+46) (* a 120.0) (if (<= a 1.5e+91) (* 60.0 (/ (- x y) (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.3e+46) {
tmp = a * 120.0;
} else if (a <= 1.5e+91) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.3d+46)) then
tmp = a * 120.0d0
else if (a <= 1.5d+91) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.3e+46) {
tmp = a * 120.0;
} else if (a <= 1.5e+91) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.3e+46: tmp = a * 120.0 elif a <= 1.5e+91: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.3e+46) tmp = Float64(a * 120.0); elseif (a <= 1.5e+91) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.3e+46) tmp = a * 120.0; elseif (a <= 1.5e+91) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.3e+46], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.5e+91], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.3 \cdot 10^{+46}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{+91}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.30000000000000007e46 or 1.50000000000000003e91 < a Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 84.3%
if -1.30000000000000007e46 < a < 1.50000000000000003e91Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 75.9%
Final simplification79.0%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (/ 60.0 (/ (- z t) (- x y)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 / ((z - t) / (x - y)));
}
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) + (60.0d0 / ((z - t) / (x - y)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 / ((z - t) / (x - y)));
}
def code(x, y, z, t, a): return (a * 120.0) + (60.0 / ((z - t) / (x - y)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / Float64(x - y)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + (60.0 / ((z - t) / (x - y))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \frac{60}{\frac{z - t}{x - y}}
\end{array}
Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (/ (- x y) (/ (- z t) 60.0))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) / ((z - t) / 60.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) + ((x - y) / ((z - t) / 60.0d0))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) / ((z - t) / 60.0));
}
def code(x, y, z, t, a): return (a * 120.0) + ((x - y) / ((z - t) / 60.0))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(Float64(x - y) / Float64(Float64(z - t) / 60.0))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + ((x - y) / ((z - t) / 60.0)); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \frac{x - y}{\frac{z - t}{60}}
\end{array}
Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 99.4%
associate-*r/99.4%
metadata-eval99.4%
distribute-lft-neg-in99.4%
distribute-rgt-neg-out99.4%
associate-*l/99.4%
+-commutative99.4%
associate-*r/99.3%
associate-*l/99.4%
distribute-lft-out99.8%
sub-neg99.8%
associate-*l/99.7%
*-commutative99.7%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.35e-17) (* a 120.0) (if (<= a 0.00055) (* -60.0 (/ y (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.35e-17) {
tmp = a * 120.0;
} else if (a <= 0.00055) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.35d-17)) then
tmp = a * 120.0d0
else if (a <= 0.00055d0) then
tmp = (-60.0d0) * (y / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.35e-17) {
tmp = a * 120.0;
} else if (a <= 0.00055) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.35e-17: tmp = a * 120.0 elif a <= 0.00055: tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.35e-17) tmp = Float64(a * 120.0); elseif (a <= 0.00055) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.35e-17) tmp = a * 120.0; elseif (a <= 0.00055) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.35e-17], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 0.00055], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.35 \cdot 10^{-17}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 0.00055:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.35e-17 or 5.50000000000000033e-4 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 76.4%
if -2.35e-17 < a < 5.50000000000000033e-4Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.0%
Taylor expanded in x around 0 43.8%
Final simplification59.6%
(FPCore (x y z t a) :precision binary64 (if (<= x 1.2e+155) (* a 120.0) (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 1.2e+155) {
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.2d+155) 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.2e+155) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 1.2e+155: 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.2e+155) 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.2e+155) 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.2e+155], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.2 \cdot 10^{+155}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if x < 1.2000000000000001e155Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 51.6%
if 1.2000000000000001e155 < x Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.0%
Taylor expanded in z around 0 61.2%
associate-*r/61.1%
associate-/l*61.2%
Simplified61.2%
Taylor expanded in x around inf 56.5%
Final simplification52.3%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 47.3%
Final simplification47.3%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2023196
(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)))