
(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 17 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 (+ (/ 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.4%
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 (<= (* a 120.0) -2e+53)
(* a 120.0)
(if (<= (* a 120.0) -1e-100)
(+ (* a 120.0) (/ x (* z 0.016666666666666666)))
(if (<= (* a 120.0) 2e-148)
t_1
(if (<= (* a 120.0) 5e-125)
(+ (* a 120.0) (/ -60.0 (/ t x)))
(if (<= (* a 120.0) 1000000.0) t_1 (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -2e+53) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-100) {
tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
} else if ((a * 120.0) <= 2e-148) {
tmp = t_1;
} else if ((a * 120.0) <= 5e-125) {
tmp = (a * 120.0) + (-60.0 / (t / x));
} else if ((a * 120.0) <= 1000000.0) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
if ((a * 120.0d0) <= (-2d+53)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-1d-100)) then
tmp = (a * 120.0d0) + (x / (z * 0.016666666666666666d0))
else if ((a * 120.0d0) <= 2d-148) then
tmp = t_1
else if ((a * 120.0d0) <= 5d-125) then
tmp = (a * 120.0d0) + ((-60.0d0) / (t / x))
else if ((a * 120.0d0) <= 1000000.0d0) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -2e+53) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-100) {
tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
} else if ((a * 120.0) <= 2e-148) {
tmp = t_1;
} else if ((a * 120.0) <= 5e-125) {
tmp = (a * 120.0) + (-60.0 / (t / x));
} else if ((a * 120.0) <= 1000000.0) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -2e+53: tmp = a * 120.0 elif (a * 120.0) <= -1e-100: tmp = (a * 120.0) + (x / (z * 0.016666666666666666)) elif (a * 120.0) <= 2e-148: tmp = t_1 elif (a * 120.0) <= 5e-125: tmp = (a * 120.0) + (-60.0 / (t / x)) elif (a * 120.0) <= 1000000.0: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -2e+53) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -1e-100) tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(z * 0.016666666666666666))); elseif (Float64(a * 120.0) <= 2e-148) tmp = t_1; elseif (Float64(a * 120.0) <= 5e-125) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(t / x))); elseif (Float64(a * 120.0) <= 1000000.0) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); tmp = 0.0; if ((a * 120.0) <= -2e+53) tmp = a * 120.0; elseif ((a * 120.0) <= -1e-100) tmp = (a * 120.0) + (x / (z * 0.016666666666666666)); elseif ((a * 120.0) <= 2e-148) tmp = t_1; elseif ((a * 120.0) <= 5e-125) tmp = (a * 120.0) + (-60.0 / (t / x)); elseif ((a * 120.0) <= 1000000.0) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+53], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-100], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(z * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-148], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-125], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1000000.0], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+53}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-100}:\\
\;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-148}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-125}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{t}{x}}\\
\mathbf{elif}\;a \cdot 120 \leq 1000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -2e53 or 1e6 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 84.2%
if -2e53 < (*.f64 a 120) < -1e-100Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 75.5%
associate-*r/75.5%
*-commutative75.5%
associate-/l*75.4%
Simplified75.4%
Taylor expanded in z around inf 69.3%
*-commutative69.3%
Simplified69.3%
if -1e-100 < (*.f64 a 120) < 1.99999999999999987e-148 or 4.99999999999999967e-125 < (*.f64 a 120) < 1e6Initial program 98.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 83.0%
if 1.99999999999999987e-148 < (*.f64 a 120) < 4.99999999999999967e-125Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around 0 88.6%
associate-*r/88.6%
associate-/l*88.6%
Simplified88.6%
Taylor expanded in x around inf 88.6%
Final simplification82.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (* a 120.0) -2e+53)
(* a 120.0)
(if (<= (* a 120.0) -1e-100)
(+ (* a 120.0) (/ x (* z 0.016666666666666666)))
(if (<= (* a 120.0) 2e-148)
t_1
(if (<= (* a 120.0) 5e-125)
(+ (* a 120.0) (/ (* 60.0 y) t))
(if (<= (* a 120.0) 1000000.0) t_1 (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -2e+53) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-100) {
tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
} else if ((a * 120.0) <= 2e-148) {
tmp = t_1;
} else if ((a * 120.0) <= 5e-125) {
tmp = (a * 120.0) + ((60.0 * y) / t);
} else if ((a * 120.0) <= 1000000.0) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
if ((a * 120.0d0) <= (-2d+53)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-1d-100)) then
tmp = (a * 120.0d0) + (x / (z * 0.016666666666666666d0))
else if ((a * 120.0d0) <= 2d-148) then
tmp = t_1
else if ((a * 120.0d0) <= 5d-125) then
tmp = (a * 120.0d0) + ((60.0d0 * y) / t)
else if ((a * 120.0d0) <= 1000000.0d0) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -2e+53) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-100) {
tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
} else if ((a * 120.0) <= 2e-148) {
tmp = t_1;
} else if ((a * 120.0) <= 5e-125) {
tmp = (a * 120.0) + ((60.0 * y) / t);
} else if ((a * 120.0) <= 1000000.0) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -2e+53: tmp = a * 120.0 elif (a * 120.0) <= -1e-100: tmp = (a * 120.0) + (x / (z * 0.016666666666666666)) elif (a * 120.0) <= 2e-148: tmp = t_1 elif (a * 120.0) <= 5e-125: tmp = (a * 120.0) + ((60.0 * y) / t) elif (a * 120.0) <= 1000000.0: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -2e+53) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -1e-100) tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(z * 0.016666666666666666))); elseif (Float64(a * 120.0) <= 2e-148) tmp = t_1; elseif (Float64(a * 120.0) <= 5e-125) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * y) / t)); elseif (Float64(a * 120.0) <= 1000000.0) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); tmp = 0.0; if ((a * 120.0) <= -2e+53) tmp = a * 120.0; elseif ((a * 120.0) <= -1e-100) tmp = (a * 120.0) + (x / (z * 0.016666666666666666)); elseif ((a * 120.0) <= 2e-148) tmp = t_1; elseif ((a * 120.0) <= 5e-125) tmp = (a * 120.0) + ((60.0 * y) / t); elseif ((a * 120.0) <= 1000000.0) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+53], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-100], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(z * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-148], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-125], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1000000.0], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+53}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-100}:\\
\;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-148}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-125}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 1000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -2e53 or 1e6 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 84.2%
if -2e53 < (*.f64 a 120) < -1e-100Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 75.5%
associate-*r/75.5%
*-commutative75.5%
associate-/l*75.4%
Simplified75.4%
Taylor expanded in z around inf 69.3%
*-commutative69.3%
Simplified69.3%
if -1e-100 < (*.f64 a 120) < 1.99999999999999987e-148 or 4.99999999999999967e-125 < (*.f64 a 120) < 1e6Initial program 98.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 83.0%
if 1.99999999999999987e-148 < (*.f64 a 120) < 4.99999999999999967e-125Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around 0 88.6%
associate-*r/88.6%
associate-/l*88.6%
Simplified88.6%
Taylor expanded in x around 0 92.6%
*-commutative92.6%
associate-*l/92.6%
Simplified92.6%
Final simplification82.2%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2e+53)
(* a 120.0)
(if (<= (* a 120.0) -1e-100)
(+ (* a 120.0) (/ x (* z 0.016666666666666666)))
(if (<= (* a 120.0) 2e-152)
(/ (- x y) (/ (- z t) 60.0))
(if (<= (* a 120.0) 5e-125)
(+ (* a 120.0) (/ (* 60.0 y) t))
(if (<= (* a 120.0) 1000000.0)
(* 60.0 (/ (- x y) (- z t)))
(* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e+53) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-100) {
tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
} else if ((a * 120.0) <= 2e-152) {
tmp = (x - y) / ((z - t) / 60.0);
} else if ((a * 120.0) <= 5e-125) {
tmp = (a * 120.0) + ((60.0 * y) / t);
} else if ((a * 120.0) <= 1000000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-2d+53)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-1d-100)) then
tmp = (a * 120.0d0) + (x / (z * 0.016666666666666666d0))
else if ((a * 120.0d0) <= 2d-152) then
tmp = (x - y) / ((z - t) / 60.0d0)
else if ((a * 120.0d0) <= 5d-125) then
tmp = (a * 120.0d0) + ((60.0d0 * y) / t)
else if ((a * 120.0d0) <= 1000000.0d0) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e+53) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -1e-100) {
tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
} else if ((a * 120.0) <= 2e-152) {
tmp = (x - y) / ((z - t) / 60.0);
} else if ((a * 120.0) <= 5e-125) {
tmp = (a * 120.0) + ((60.0 * y) / t);
} else if ((a * 120.0) <= 1000000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e+53: tmp = a * 120.0 elif (a * 120.0) <= -1e-100: tmp = (a * 120.0) + (x / (z * 0.016666666666666666)) elif (a * 120.0) <= 2e-152: tmp = (x - y) / ((z - t) / 60.0) elif (a * 120.0) <= 5e-125: tmp = (a * 120.0) + ((60.0 * y) / t) elif (a * 120.0) <= 1000000.0: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e+53) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -1e-100) tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(z * 0.016666666666666666))); elseif (Float64(a * 120.0) <= 2e-152) tmp = Float64(Float64(x - y) / Float64(Float64(z - t) / 60.0)); elseif (Float64(a * 120.0) <= 5e-125) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * y) / t)); elseif (Float64(a * 120.0) <= 1000000.0) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e+53) tmp = a * 120.0; elseif ((a * 120.0) <= -1e-100) tmp = (a * 120.0) + (x / (z * 0.016666666666666666)); elseif ((a * 120.0) <= 2e-152) tmp = (x - y) / ((z - t) / 60.0); elseif ((a * 120.0) <= 5e-125) tmp = (a * 120.0) + ((60.0 * y) / t); elseif ((a * 120.0) <= 1000000.0) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e+53], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-100], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(z * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-152], N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-125], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1000000.0], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{+53}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -1 \cdot 10^{-100}:\\
\;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-152}:\\
\;\;\;\;\frac{x - y}{\frac{z - t}{60}}\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-125}:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 1000000:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -2e53 or 1e6 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 84.2%
if -2e53 < (*.f64 a 120) < -1e-100Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 75.5%
associate-*r/75.5%
*-commutative75.5%
associate-/l*75.4%
Simplified75.4%
Taylor expanded in z around inf 69.3%
*-commutative69.3%
Simplified69.3%
if -1e-100 < (*.f64 a 120) < 2.00000000000000013e-152Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 88.4%
expm1-log1p-u56.0%
expm1-udef26.4%
associate-*r/26.4%
*-commutative26.4%
Applied egg-rr26.4%
expm1-def56.1%
expm1-log1p88.5%
associate-/l*88.5%
Simplified88.5%
if 2.00000000000000013e-152 < (*.f64 a 120) < 4.99999999999999967e-125Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 90.8%
associate-*r/90.7%
associate-/l*90.7%
Simplified90.7%
Taylor expanded in x around 0 94.1%
*-commutative94.1%
associate-*l/93.9%
Simplified93.9%
if 4.99999999999999967e-125 < (*.f64 a 120) < 1e6Initial program 97.2%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 72.6%
Final simplification82.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* (- x y) (/ -60.0 t))))
(t_2 (+ (* a 120.0) (* -60.0 (/ y z)))))
(if (<= z -5.8e+78)
(+ (* a 120.0) (/ x (* z 0.016666666666666666)))
(if (<= z -1e+23)
(/ (- x y) (/ (- z t) 60.0))
(if (<= z -4.6e-23)
t_2
(if (<= z 1.5e-58)
t_1
(if (<= z 195000000.0)
(* 60.0 (/ (- x y) (- z t)))
(if (<= z 5e+93) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + ((x - y) * (-60.0 / t));
double t_2 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if (z <= -5.8e+78) {
tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
} else if (z <= -1e+23) {
tmp = (x - y) / ((z - t) / 60.0);
} else if (z <= -4.6e-23) {
tmp = t_2;
} else if (z <= 1.5e-58) {
tmp = t_1;
} else if (z <= 195000000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 5e+93) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (a * 120.0d0) + ((x - y) * ((-60.0d0) / t))
t_2 = (a * 120.0d0) + ((-60.0d0) * (y / z))
if (z <= (-5.8d+78)) then
tmp = (a * 120.0d0) + (x / (z * 0.016666666666666666d0))
else if (z <= (-1d+23)) then
tmp = (x - y) / ((z - t) / 60.0d0)
else if (z <= (-4.6d-23)) then
tmp = t_2
else if (z <= 1.5d-58) then
tmp = t_1
else if (z <= 195000000.0d0) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (z <= 5d+93) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + ((x - y) * (-60.0 / t));
double t_2 = (a * 120.0) + (-60.0 * (y / z));
double tmp;
if (z <= -5.8e+78) {
tmp = (a * 120.0) + (x / (z * 0.016666666666666666));
} else if (z <= -1e+23) {
tmp = (x - y) / ((z - t) / 60.0);
} else if (z <= -4.6e-23) {
tmp = t_2;
} else if (z <= 1.5e-58) {
tmp = t_1;
} else if (z <= 195000000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (z <= 5e+93) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + ((x - y) * (-60.0 / t)) t_2 = (a * 120.0) + (-60.0 * (y / z)) tmp = 0 if z <= -5.8e+78: tmp = (a * 120.0) + (x / (z * 0.016666666666666666)) elif z <= -1e+23: tmp = (x - y) / ((z - t) / 60.0) elif z <= -4.6e-23: tmp = t_2 elif z <= 1.5e-58: tmp = t_1 elif z <= 195000000.0: tmp = 60.0 * ((x - y) / (z - t)) elif z <= 5e+93: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(-60.0 / t))) t_2 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))) tmp = 0.0 if (z <= -5.8e+78) tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(z * 0.016666666666666666))); elseif (z <= -1e+23) tmp = Float64(Float64(x - y) / Float64(Float64(z - t) / 60.0)); elseif (z <= -4.6e-23) tmp = t_2; elseif (z <= 1.5e-58) tmp = t_1; elseif (z <= 195000000.0) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (z <= 5e+93) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + ((x - y) * (-60.0 / t)); t_2 = (a * 120.0) + (-60.0 * (y / z)); tmp = 0.0; if (z <= -5.8e+78) tmp = (a * 120.0) + (x / (z * 0.016666666666666666)); elseif (z <= -1e+23) tmp = (x - y) / ((z - t) / 60.0); elseif (z <= -4.6e-23) tmp = t_2; elseif (z <= 1.5e-58) tmp = t_1; elseif (z <= 195000000.0) tmp = 60.0 * ((x - y) / (z - t)); elseif (z <= 5e+93) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.8e+78], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(z * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1e+23], N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.6e-23], t$95$2, If[LessEqual[z, 1.5e-58], t$95$1, If[LessEqual[z, 195000000.0], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+93], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\
t_2 := a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{+78}:\\
\;\;\;\;a \cdot 120 + \frac{x}{z \cdot 0.016666666666666666}\\
\mathbf{elif}\;z \leq -1 \cdot 10^{+23}:\\
\;\;\;\;\frac{x - y}{\frac{z - t}{60}}\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{-23}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-58}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 195000000:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+93}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -5.80000000000000034e78Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 88.0%
associate-*r/88.1%
*-commutative88.1%
associate-/l*88.0%
Simplified88.0%
Taylor expanded in z around inf 88.0%
*-commutative88.0%
Simplified88.0%
if -5.80000000000000034e78 < z < -9.9999999999999992e22Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 77.3%
expm1-log1p-u27.5%
expm1-udef14.0%
associate-*r/14.0%
*-commutative14.0%
Applied egg-rr14.0%
expm1-def27.5%
expm1-log1p77.5%
associate-/l*77.5%
Simplified77.5%
if -9.9999999999999992e22 < z < -4.6000000000000002e-23 or 5.0000000000000001e93 < z Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 96.4%
associate-*r/96.4%
*-commutative96.4%
associate-/l*96.5%
Simplified96.5%
Taylor expanded in x around 0 87.2%
if -4.6000000000000002e-23 < z < 1.50000000000000004e-58 or 1.95e8 < z < 5.0000000000000001e93Initial program 99.1%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around 0 87.6%
associate-*r/86.9%
associate-/l*87.6%
Simplified87.6%
associate-/r/87.6%
Applied egg-rr87.6%
if 1.50000000000000004e-58 < z < 1.95e8Initial program 100.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 89.9%
Final simplification87.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (* a 120.0) -1e-10)
(* a 120.0)
(if (<= (* a 120.0) 2e-148)
t_1
(if (<= (* a 120.0) 5e-125)
(+ (* a 120.0) (/ -60.0 (/ t x)))
(if (<= (* a 120.0) 1000000.0) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -1e-10) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-148) {
tmp = t_1;
} else if ((a * 120.0) <= 5e-125) {
tmp = (a * 120.0) + (-60.0 / (t / x));
} else if ((a * 120.0) <= 1000000.0) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
if ((a * 120.0d0) <= (-1d-10)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 2d-148) then
tmp = t_1
else if ((a * 120.0d0) <= 5d-125) then
tmp = (a * 120.0d0) + ((-60.0d0) / (t / x))
else if ((a * 120.0d0) <= 1000000.0d0) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -1e-10) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 2e-148) {
tmp = t_1;
} else if ((a * 120.0) <= 5e-125) {
tmp = (a * 120.0) + (-60.0 / (t / x));
} else if ((a * 120.0) <= 1000000.0) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -1e-10: tmp = a * 120.0 elif (a * 120.0) <= 2e-148: tmp = t_1 elif (a * 120.0) <= 5e-125: tmp = (a * 120.0) + (-60.0 / (t / x)) elif (a * 120.0) <= 1000000.0: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -1e-10) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 2e-148) tmp = t_1; elseif (Float64(a * 120.0) <= 5e-125) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(t / x))); elseif (Float64(a * 120.0) <= 1000000.0) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); tmp = 0.0; if ((a * 120.0) <= -1e-10) tmp = a * 120.0; elseif ((a * 120.0) <= 2e-148) tmp = t_1; elseif ((a * 120.0) <= 5e-125) tmp = (a * 120.0) + (-60.0 / (t / x)); elseif ((a * 120.0) <= 1000000.0) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e-10], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-148], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-125], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1000000.0], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{-10}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{-148}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{-125}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{t}{x}}\\
\mathbf{elif}\;a \cdot 120 \leq 1000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1.00000000000000004e-10 or 1e6 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 80.7%
if -1.00000000000000004e-10 < (*.f64 a 120) < 1.99999999999999987e-148 or 4.99999999999999967e-125 < (*.f64 a 120) < 1e6Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.6%
if 1.99999999999999987e-148 < (*.f64 a 120) < 4.99999999999999967e-125Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around 0 88.6%
associate-*r/88.6%
associate-/l*88.6%
Simplified88.6%
Taylor expanded in x around inf 88.6%
Final simplification80.4%
(FPCore (x y z t a)
:precision binary64
(if (or (<= a -7e-116)
(not
(or (<= a 1.25e-149) (and (not (<= a 1.9e-132)) (<= a 2.2e-41)))))
(* a 120.0)
(* -60.0 (/ y (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7e-116) || !((a <= 1.25e-149) || (!(a <= 1.9e-132) && (a <= 2.2e-41)))) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-7d-116)) .or. (.not. (a <= 1.25d-149) .or. (.not. (a <= 1.9d-132)) .and. (a <= 2.2d-41))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7e-116) || !((a <= 1.25e-149) || (!(a <= 1.9e-132) && (a <= 2.2e-41)))) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7e-116) or not ((a <= 1.25e-149) or (not (a <= 1.9e-132) and (a <= 2.2e-41))): tmp = a * 120.0 else: tmp = -60.0 * (y / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7e-116) || !((a <= 1.25e-149) || (!(a <= 1.9e-132) && (a <= 2.2e-41)))) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7e-116) || ~(((a <= 1.25e-149) || (~((a <= 1.9e-132)) && (a <= 2.2e-41))))) tmp = a * 120.0; else tmp = -60.0 * (y / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7e-116], N[Not[Or[LessEqual[a, 1.25e-149], And[N[Not[LessEqual[a, 1.9e-132]], $MachinePrecision], LessEqual[a, 2.2e-41]]]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{-116} \lor \neg \left(a \leq 1.25 \cdot 10^{-149} \lor \neg \left(a \leq 1.9 \cdot 10^{-132}\right) \land a \leq 2.2 \cdot 10^{-41}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if a < -6.99999999999999968e-116 or 1.24999999999999992e-149 < a < 1.8999999999999998e-132 or 2.2e-41 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 74.2%
if -6.99999999999999968e-116 < a < 1.24999999999999992e-149 or 1.8999999999999998e-132 < a < 2.2e-41Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 54.2%
Final simplification67.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.6e-118)
(* a 120.0)
(if (<= a 1.3e-149)
(* -60.0 (/ y (- z t)))
(if (or (<= a 5e-131) (not (<= a 2.75e-39)))
(* a 120.0)
(* -60.0 (/ (- x y) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.6e-118) {
tmp = a * 120.0;
} else if (a <= 1.3e-149) {
tmp = -60.0 * (y / (z - t));
} else if ((a <= 5e-131) || !(a <= 2.75e-39)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.6d-118)) then
tmp = a * 120.0d0
else if (a <= 1.3d-149) then
tmp = (-60.0d0) * (y / (z - t))
else if ((a <= 5d-131) .or. (.not. (a <= 2.75d-39))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * ((x - y) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.6e-118) {
tmp = a * 120.0;
} else if (a <= 1.3e-149) {
tmp = -60.0 * (y / (z - t));
} else if ((a <= 5e-131) || !(a <= 2.75e-39)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.6e-118: tmp = a * 120.0 elif a <= 1.3e-149: tmp = -60.0 * (y / (z - t)) elif (a <= 5e-131) or not (a <= 2.75e-39): tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.6e-118) tmp = Float64(a * 120.0); elseif (a <= 1.3e-149) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif ((a <= 5e-131) || !(a <= 2.75e-39)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.6e-118) tmp = a * 120.0; elseif (a <= 1.3e-149) tmp = -60.0 * (y / (z - t)); elseif ((a <= 5e-131) || ~((a <= 2.75e-39))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.6e-118], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.3e-149], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 5e-131], N[Not[LessEqual[a, 2.75e-39]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.6 \cdot 10^{-118}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{-149}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;a \leq 5 \cdot 10^{-131} \lor \neg \left(a \leq 2.75 \cdot 10^{-39}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -2.6e-118 or 1.29999999999999999e-149 < a < 5.0000000000000004e-131 or 2.75000000000000009e-39 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 74.2%
if -2.6e-118 < a < 1.29999999999999999e-149Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 58.1%
if 5.0000000000000004e-131 < a < 2.75000000000000009e-39Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 84.6%
expm1-log1p-u38.6%
expm1-udef25.2%
associate-*r/25.2%
*-commutative25.2%
Applied egg-rr25.2%
expm1-def38.6%
expm1-log1p84.5%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in z around 0 54.9%
Final simplification68.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.9e-112)
(* a 120.0)
(if (<= a 1.3e-149)
(/ -60.0 (/ (- z t) y))
(if (or (<= a 1e-132) (not (<= a 2.1e-40)))
(* a 120.0)
(* -60.0 (/ (- x y) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.9e-112) {
tmp = a * 120.0;
} else if (a <= 1.3e-149) {
tmp = -60.0 / ((z - t) / y);
} else if ((a <= 1e-132) || !(a <= 2.1e-40)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.9d-112)) then
tmp = a * 120.0d0
else if (a <= 1.3d-149) then
tmp = (-60.0d0) / ((z - t) / y)
else if ((a <= 1d-132) .or. (.not. (a <= 2.1d-40))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * ((x - y) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.9e-112) {
tmp = a * 120.0;
} else if (a <= 1.3e-149) {
tmp = -60.0 / ((z - t) / y);
} else if ((a <= 1e-132) || !(a <= 2.1e-40)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.9e-112: tmp = a * 120.0 elif a <= 1.3e-149: tmp = -60.0 / ((z - t) / y) elif (a <= 1e-132) or not (a <= 2.1e-40): tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.9e-112) tmp = Float64(a * 120.0); elseif (a <= 1.3e-149) tmp = Float64(-60.0 / Float64(Float64(z - t) / y)); elseif ((a <= 1e-132) || !(a <= 2.1e-40)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.9e-112) tmp = a * 120.0; elseif (a <= 1.3e-149) tmp = -60.0 / ((z - t) / y); elseif ((a <= 1e-132) || ~((a <= 2.1e-40))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.9e-112], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.3e-149], N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 1e-132], N[Not[LessEqual[a, 2.1e-40]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.9 \cdot 10^{-112}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{-149}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}}\\
\mathbf{elif}\;a \leq 10^{-132} \lor \neg \left(a \leq 2.1 \cdot 10^{-40}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -3.9000000000000001e-112 or 1.29999999999999999e-149 < a < 9.9999999999999999e-133 or 2.10000000000000018e-40 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 74.2%
if -3.9000000000000001e-112 < a < 1.29999999999999999e-149Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 58.1%
associate-*r/58.1%
associate-/l*58.1%
Simplified58.1%
if 9.9999999999999999e-133 < a < 2.10000000000000018e-40Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 84.6%
expm1-log1p-u38.6%
expm1-udef25.2%
associate-*r/25.2%
*-commutative25.2%
Applied egg-rr25.2%
expm1-def38.6%
expm1-log1p84.5%
associate-/l*84.5%
Simplified84.5%
Taylor expanded in z around 0 54.9%
Final simplification68.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.3e-29) (not (<= t 8.6e-56))) (+ (* a 120.0) (* (- x y) (/ -60.0 t))) (+ (* a 120.0) (* (- x y) (/ 60.0 z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.3e-29) || !(t <= 8.6e-56)) {
tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
} else {
tmp = (a * 120.0) + ((x - y) * (60.0 / 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 ((t <= (-4.3d-29)) .or. (.not. (t <= 8.6d-56))) then
tmp = (a * 120.0d0) + ((x - y) * ((-60.0d0) / t))
else
tmp = (a * 120.0d0) + ((x - y) * (60.0d0 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.3e-29) || !(t <= 8.6e-56)) {
tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
} else {
tmp = (a * 120.0) + ((x - y) * (60.0 / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.3e-29) or not (t <= 8.6e-56): tmp = (a * 120.0) + ((x - y) * (-60.0 / t)) else: tmp = (a * 120.0) + ((x - y) * (60.0 / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.3e-29) || !(t <= 8.6e-56)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(-60.0 / t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.3e-29) || ~((t <= 8.6e-56))) tmp = (a * 120.0) + ((x - y) * (-60.0 / t)); else tmp = (a * 120.0) + ((x - y) * (60.0 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.3e-29], N[Not[LessEqual[t, 8.6e-56]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.3 \cdot 10^{-29} \lor \neg \left(t \leq 8.6 \cdot 10^{-56}\right):\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z}\\
\end{array}
\end{array}
if t < -4.2999999999999998e-29 or 8.6000000000000002e-56 < t Initial program 99.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 89.0%
associate-*r/88.4%
associate-/l*89.0%
Simplified89.0%
associate-/r/89.0%
Applied egg-rr89.0%
if -4.2999999999999998e-29 < t < 8.6000000000000002e-56Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 85.4%
associate-*r/85.5%
*-commutative85.5%
associate-/l*85.4%
Simplified85.4%
div-inv85.5%
*-commutative85.5%
clear-num85.5%
Applied egg-rr85.5%
Final simplification87.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -4.7e+75) (not (<= x 2.5e+175))) (+ (* a 120.0) (/ 60.0 (/ (- z t) x))) (+ (* a 120.0) (/ (* y -60.0) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -4.7e+75) || !(x <= 2.5e+175)) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (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 ((x <= (-4.7d+75)) .or. (.not. (x <= 2.5d+175))) then
tmp = (a * 120.0d0) + (60.0d0 / ((z - t) / x))
else
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (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 ((x <= -4.7e+75) || !(x <= 2.5e+175)) {
tmp = (a * 120.0) + (60.0 / ((z - t) / x));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -4.7e+75) or not (x <= 2.5e+175): tmp = (a * 120.0) + (60.0 / ((z - t) / x)) else: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -4.7e+75) || !(x <= 2.5e+175)) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(Float64(z - t) / x))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -4.7e+75) || ~((x <= 2.5e+175))) tmp = (a * 120.0) + (60.0 / ((z - t) / x)); else tmp = (a * 120.0) + ((y * -60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -4.7e+75], N[Not[LessEqual[x, 2.5e+175]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.7 \cdot 10^{+75} \lor \neg \left(x \leq 2.5 \cdot 10^{+175}\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z - t}{x}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if x < -4.69999999999999984e75 or 2.5e175 < x Initial program 98.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 93.4%
if -4.69999999999999984e75 < x < 2.5e175Initial program 99.8%
Taylor expanded in x around 0 92.3%
Final simplification92.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -3.7e-30)
(+ (* a 120.0) (* (- x y) (/ -60.0 t)))
(if (<= t 2.85e-56)
(+ (* a 120.0) (* (- x y) (/ 60.0 z)))
(+ (* a 120.0) (/ -60.0 (/ t (- x y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.7e-30) {
tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
} else if (t <= 2.85e-56) {
tmp = (a * 120.0) + ((x - y) * (60.0 / z));
} else {
tmp = (a * 120.0) + (-60.0 / (t / (x - 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 (t <= (-3.7d-30)) then
tmp = (a * 120.0d0) + ((x - y) * ((-60.0d0) / t))
else if (t <= 2.85d-56) then
tmp = (a * 120.0d0) + ((x - y) * (60.0d0 / z))
else
tmp = (a * 120.0d0) + ((-60.0d0) / (t / (x - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.7e-30) {
tmp = (a * 120.0) + ((x - y) * (-60.0 / t));
} else if (t <= 2.85e-56) {
tmp = (a * 120.0) + ((x - y) * (60.0 / z));
} else {
tmp = (a * 120.0) + (-60.0 / (t / (x - y)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.7e-30: tmp = (a * 120.0) + ((x - y) * (-60.0 / t)) elif t <= 2.85e-56: tmp = (a * 120.0) + ((x - y) * (60.0 / z)) else: tmp = (a * 120.0) + (-60.0 / (t / (x - y))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.7e-30) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(-60.0 / t))); elseif (t <= 2.85e-56) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / z))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(t / Float64(x - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.7e-30) tmp = (a * 120.0) + ((x - y) * (-60.0 / t)); elseif (t <= 2.85e-56) tmp = (a * 120.0) + ((x - y) * (60.0 / z)); else tmp = (a * 120.0) + (-60.0 / (t / (x - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.7e-30], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.85e-56], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{-30}:\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{elif}\;t \leq 2.85 \cdot 10^{-56}:\\
\;\;\;\;a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{t}{x - y}}\\
\end{array}
\end{array}
if t < -3.7000000000000003e-30Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 90.0%
associate-*r/90.0%
associate-/l*89.9%
Simplified89.9%
associate-/r/90.0%
Applied egg-rr90.0%
if -3.7000000000000003e-30 < t < 2.8499999999999999e-56Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 85.4%
associate-*r/85.5%
*-commutative85.5%
associate-/l*85.4%
Simplified85.4%
div-inv85.5%
*-commutative85.5%
clear-num85.5%
Applied egg-rr85.5%
if 2.8499999999999999e-56 < t Initial program 98.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 88.3%
associate-*r/87.0%
associate-/l*88.2%
Simplified88.2%
Final simplification87.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6.8e-19) (not (<= a 2700000.0))) (* 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 <= -6.8e-19) || !(a <= 2700000.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) :: tmp
if ((a <= (-6.8d-19)) .or. (.not. (a <= 2700000.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 tmp;
if ((a <= -6.8e-19) || !(a <= 2700000.0)) {
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 <= -6.8e-19) or not (a <= 2700000.0): 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 <= -6.8e-19) || !(a <= 2700000.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) tmp = 0.0; if ((a <= -6.8e-19) || ~((a <= 2700000.0))) 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, -6.8e-19], N[Not[LessEqual[a, 2700000.0]], $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 -6.8 \cdot 10^{-19} \lor \neg \left(a \leq 2700000\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -6.8000000000000004e-19 or 2.7e6 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 80.7%
if -6.8000000000000004e-19 < a < 2.7e6Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 76.6%
Final simplification78.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.6e-141) (not (<= a 7.8e-108))) (* a 120.0) (* 60.0 (/ y t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.6e-141) || !(a <= 7.8e-108)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-5.6d-141)) .or. (.not. (a <= 7.8d-108))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.6e-141) || !(a <= 7.8e-108)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.6e-141) or not (a <= 7.8e-108): tmp = a * 120.0 else: tmp = 60.0 * (y / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.6e-141) || !(a <= 7.8e-108)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -5.6e-141) || ~((a <= 7.8e-108))) tmp = a * 120.0; else tmp = 60.0 * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.6e-141], N[Not[LessEqual[a, 7.8e-108]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.6 \cdot 10^{-141} \lor \neg \left(a \leq 7.8 \cdot 10^{-108}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\end{array}
\end{array}
if a < -5.60000000000000023e-141 or 7.79999999999999989e-108 < a Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 67.9%
if -5.60000000000000023e-141 < a < 7.79999999999999989e-108Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around 0 61.3%
associate-*r/61.3%
associate-/l*61.3%
Simplified61.3%
Taylor expanded in x around 0 48.1%
*-commutative48.1%
associate-*l/48.1%
Simplified48.1%
+-commutative48.1%
fma-def48.1%
*-commutative48.1%
*-un-lft-identity48.1%
times-frac48.1%
metadata-eval48.1%
Applied egg-rr48.1%
Taylor expanded in a around 0 39.0%
Final simplification59.3%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
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) * (60.0d0 / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + ((x - y) * (60.0 / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + ((x - y) * (60.0 / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z - t}
\end{array}
Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= y 5.2e+195) (* a 120.0) (* -60.0 (/ y z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 5.2e+195) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (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 (y <= 5.2d+195) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (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 (y <= 5.2e+195) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 5.2e+195: tmp = a * 120.0 else: tmp = -60.0 * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 5.2e+195) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 5.2e+195) tmp = a * 120.0; else tmp = -60.0 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 5.2e+195], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.2 \cdot 10^{+195}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < 5.20000000000000004e195Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 57.6%
if 5.20000000000000004e195 < y Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 54.2%
associate-*r/54.1%
*-commutative54.1%
associate-/l*54.3%
Simplified54.3%
Taylor expanded in y around inf 41.9%
Final simplification55.6%
(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.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 52.8%
Final simplification52.8%
(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 2023336
(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)))