
(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 (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.1%
+-commutative99.1%
fma-def99.1%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* -60.0 (/ y (- z t))) (* a 120.0))))
(if (<= y -1.8e+152)
t_1
(if (<= y -3.8e+106)
(* (/ 60.0 (- z t)) (- x y))
(if (or (<= y -8.2e-7) (not (<= y 1.65e+78)))
t_1
(+ (* 60.0 (/ x (- z t))) (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (-60.0 * (y / (z - t))) + (a * 120.0);
double tmp;
if (y <= -1.8e+152) {
tmp = t_1;
} else if (y <= -3.8e+106) {
tmp = (60.0 / (z - t)) * (x - y);
} else if ((y <= -8.2e-7) || !(y <= 1.65e+78)) {
tmp = t_1;
} else {
tmp = (60.0 * (x / (z - t))) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = ((-60.0d0) * (y / (z - t))) + (a * 120.0d0)
if (y <= (-1.8d+152)) then
tmp = t_1
else if (y <= (-3.8d+106)) then
tmp = (60.0d0 / (z - t)) * (x - y)
else if ((y <= (-8.2d-7)) .or. (.not. (y <= 1.65d+78))) then
tmp = t_1
else
tmp = (60.0d0 * (x / (z - t))) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (-60.0 * (y / (z - t))) + (a * 120.0);
double tmp;
if (y <= -1.8e+152) {
tmp = t_1;
} else if (y <= -3.8e+106) {
tmp = (60.0 / (z - t)) * (x - y);
} else if ((y <= -8.2e-7) || !(y <= 1.65e+78)) {
tmp = t_1;
} else {
tmp = (60.0 * (x / (z - t))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (-60.0 * (y / (z - t))) + (a * 120.0) tmp = 0 if y <= -1.8e+152: tmp = t_1 elif y <= -3.8e+106: tmp = (60.0 / (z - t)) * (x - y) elif (y <= -8.2e-7) or not (y <= 1.65e+78): tmp = t_1 else: tmp = (60.0 * (x / (z - t))) + (a * 120.0) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-60.0 * Float64(y / Float64(z - t))) + Float64(a * 120.0)) tmp = 0.0 if (y <= -1.8e+152) tmp = t_1; elseif (y <= -3.8e+106) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); elseif ((y <= -8.2e-7) || !(y <= 1.65e+78)) tmp = t_1; else tmp = Float64(Float64(60.0 * Float64(x / Float64(z - t))) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (-60.0 * (y / (z - t))) + (a * 120.0); tmp = 0.0; if (y <= -1.8e+152) tmp = t_1; elseif (y <= -3.8e+106) tmp = (60.0 / (z - t)) * (x - y); elseif ((y <= -8.2e-7) || ~((y <= 1.65e+78))) tmp = t_1; else tmp = (60.0 * (x / (z - t))) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.8e+152], t$95$1, If[LessEqual[y, -3.8e+106], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -8.2e-7], N[Not[LessEqual[y, 1.65e+78]], $MachinePrecision]], t$95$1, N[(N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t} + a \cdot 120\\
\mathbf{if}\;y \leq -1.8 \cdot 10^{+152}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{+106}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{elif}\;y \leq -8.2 \cdot 10^{-7} \lor \neg \left(y \leq 1.65 \cdot 10^{+78}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if y < -1.7999999999999999e152 or -3.7999999999999998e106 < y < -8.1999999999999998e-7 or 1.65e78 < y Initial program 98.9%
Taylor expanded in x around 0 94.2%
if -1.7999999999999999e152 < y < -3.7999999999999998e106Initial program 99.8%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 100.0%
associate-*r/99.8%
*-commutative99.8%
associate-*r/99.8%
Simplified99.8%
if -8.1999999999999998e-7 < y < 1.65e78Initial program 99.2%
Taylor expanded in x around inf 92.3%
Final simplification93.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (/ (* y -60.0) (- z t)) (* a 120.0))))
(if (<= y -1.8e+152)
t_1
(if (<= y -5.8e+106)
(* (/ 60.0 (- z t)) (- x y))
(if (<= y -1.75e-7)
(+ (* -60.0 (/ y (- z t))) (* a 120.0))
(if (<= y 1.35e+78) (+ (* 60.0 (/ x (- z t))) (* a 120.0)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y * -60.0) / (z - t)) + (a * 120.0);
double tmp;
if (y <= -1.8e+152) {
tmp = t_1;
} else if (y <= -5.8e+106) {
tmp = (60.0 / (z - t)) * (x - y);
} else if (y <= -1.75e-7) {
tmp = (-60.0 * (y / (z - t))) + (a * 120.0);
} else if (y <= 1.35e+78) {
tmp = (60.0 * (x / (z - t))) + (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 = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
if (y <= (-1.8d+152)) then
tmp = t_1
else if (y <= (-5.8d+106)) then
tmp = (60.0d0 / (z - t)) * (x - y)
else if (y <= (-1.75d-7)) then
tmp = ((-60.0d0) * (y / (z - t))) + (a * 120.0d0)
else if (y <= 1.35d+78) then
tmp = (60.0d0 * (x / (z - t))) + (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 = ((y * -60.0) / (z - t)) + (a * 120.0);
double tmp;
if (y <= -1.8e+152) {
tmp = t_1;
} else if (y <= -5.8e+106) {
tmp = (60.0 / (z - t)) * (x - y);
} else if (y <= -1.75e-7) {
tmp = (-60.0 * (y / (z - t))) + (a * 120.0);
} else if (y <= 1.35e+78) {
tmp = (60.0 * (x / (z - t))) + (a * 120.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((y * -60.0) / (z - t)) + (a * 120.0) tmp = 0 if y <= -1.8e+152: tmp = t_1 elif y <= -5.8e+106: tmp = (60.0 / (z - t)) * (x - y) elif y <= -1.75e-7: tmp = (-60.0 * (y / (z - t))) + (a * 120.0) elif y <= 1.35e+78: tmp = (60.0 * (x / (z - t))) + (a * 120.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)) tmp = 0.0 if (y <= -1.8e+152) tmp = t_1; elseif (y <= -5.8e+106) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); elseif (y <= -1.75e-7) tmp = Float64(Float64(-60.0 * Float64(y / Float64(z - t))) + Float64(a * 120.0)); elseif (y <= 1.35e+78) tmp = Float64(Float64(60.0 * Float64(x / Float64(z - t))) + Float64(a * 120.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((y * -60.0) / (z - t)) + (a * 120.0); tmp = 0.0; if (y <= -1.8e+152) tmp = t_1; elseif (y <= -5.8e+106) tmp = (60.0 / (z - t)) * (x - y); elseif (y <= -1.75e-7) tmp = (-60.0 * (y / (z - t))) + (a * 120.0); elseif (y <= 1.35e+78) tmp = (60.0 * (x / (z - t))) + (a * 120.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.8e+152], t$95$1, If[LessEqual[y, -5.8e+106], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.75e-7], N[(N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e+78], N[(N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot -60}{z - t} + a \cdot 120\\
\mathbf{if}\;y \leq -1.8 \cdot 10^{+152}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -5.8 \cdot 10^{+106}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{elif}\;y \leq -1.75 \cdot 10^{-7}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t} + a \cdot 120\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+78}:\\
\;\;\;\;60 \cdot \frac{x}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.7999999999999999e152 or 1.35000000000000002e78 < y Initial program 98.5%
Taylor expanded in x around 0 94.6%
associate-*r/94.7%
Simplified94.7%
if -1.7999999999999999e152 < y < -5.8000000000000004e106Initial program 99.8%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 100.0%
associate-*r/99.8%
*-commutative99.8%
associate-*r/99.8%
Simplified99.8%
if -5.8000000000000004e106 < y < -1.74999999999999992e-7Initial program 99.9%
Taylor expanded in x around 0 93.0%
if -1.74999999999999992e-7 < y < 1.35000000000000002e78Initial program 99.2%
Taylor expanded in x around inf 92.3%
Final simplification93.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -2e-87) (not (<= (* a 120.0) 5e-136))) (+ (* -60.0 (/ y (- z t))) (* a 120.0)) (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2e-87) || !((a * 120.0) <= 5e-136)) {
tmp = (-60.0 * (y / (z - t))) + (a * 120.0);
} else {
tmp = (60.0 / (z - 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 (((a * 120.0d0) <= (-2d-87)) .or. (.not. ((a * 120.0d0) <= 5d-136))) then
tmp = ((-60.0d0) * (y / (z - t))) + (a * 120.0d0)
else
tmp = (60.0d0 / (z - 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 (((a * 120.0) <= -2e-87) || !((a * 120.0) <= 5e-136)) {
tmp = (-60.0 * (y / (z - t))) + (a * 120.0);
} else {
tmp = (60.0 / (z - t)) * (x - y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -2e-87) or not ((a * 120.0) <= 5e-136): tmp = (-60.0 * (y / (z - t))) + (a * 120.0) else: tmp = (60.0 / (z - t)) * (x - y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -2e-87) || !(Float64(a * 120.0) <= 5e-136)) tmp = Float64(Float64(-60.0 * Float64(y / Float64(z - t))) + Float64(a * 120.0)); else tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -2e-87) || ~(((a * 120.0) <= 5e-136))) tmp = (-60.0 * (y / (z - t))) + (a * 120.0); else tmp = (60.0 / (z - t)) * (x - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-87], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 5e-136]], $MachinePrecision]], N[(N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-87} \lor \neg \left(a \cdot 120 \leq 5 \cdot 10^{-136}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\end{array}
\end{array}
if (*.f64 a 120) < -2.00000000000000004e-87 or 5.0000000000000002e-136 < (*.f64 a 120) Initial program 98.8%
Taylor expanded in x around 0 85.8%
if -2.00000000000000004e-87 < (*.f64 a 120) < 5.0000000000000002e-136Initial program 99.8%
associate-*l/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 87.4%
associate-*r/87.6%
*-commutative87.6%
associate-*r/87.5%
Simplified87.5%
Final simplification86.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -5000000.0) (not (<= (* a 120.0) 4e-45))) (* a 120.0) (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -5000000.0) || !((a * 120.0) <= 4e-45)) {
tmp = a * 120.0;
} else {
tmp = (60.0 / (z - 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 (((a * 120.0d0) <= (-5000000.0d0)) .or. (.not. ((a * 120.0d0) <= 4d-45))) then
tmp = a * 120.0d0
else
tmp = (60.0d0 / (z - 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 (((a * 120.0) <= -5000000.0) || !((a * 120.0) <= 4e-45)) {
tmp = a * 120.0;
} else {
tmp = (60.0 / (z - t)) * (x - y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -5000000.0) or not ((a * 120.0) <= 4e-45): tmp = a * 120.0 else: tmp = (60.0 / (z - t)) * (x - y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -5000000.0) || !(Float64(a * 120.0) <= 4e-45)) tmp = Float64(a * 120.0); else tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -5000000.0) || ~(((a * 120.0) <= 4e-45))) tmp = a * 120.0; else tmp = (60.0 / (z - t)) * (x - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -5000000.0], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 4e-45]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5000000 \lor \neg \left(a \cdot 120 \leq 4 \cdot 10^{-45}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\end{array}
\end{array}
if (*.f64 a 120) < -5e6 or 3.99999999999999994e-45 < (*.f64 a 120) Initial program 98.5%
Taylor expanded in z around inf 72.8%
if -5e6 < (*.f64 a 120) < 3.99999999999999994e-45Initial program 99.8%
associate-*l/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 78.0%
associate-*r/78.1%
*-commutative78.1%
associate-*r/78.0%
Simplified78.0%
Final simplification75.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -5000000.0) (not (<= (* a 120.0) 4e-45))) (+ (* -60.0 (/ y z)) (* a 120.0)) (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -5000000.0) || !((a * 120.0) <= 4e-45)) {
tmp = (-60.0 * (y / z)) + (a * 120.0);
} else {
tmp = (60.0 / (z - 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 (((a * 120.0d0) <= (-5000000.0d0)) .or. (.not. ((a * 120.0d0) <= 4d-45))) then
tmp = ((-60.0d0) * (y / z)) + (a * 120.0d0)
else
tmp = (60.0d0 / (z - 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 (((a * 120.0) <= -5000000.0) || !((a * 120.0) <= 4e-45)) {
tmp = (-60.0 * (y / z)) + (a * 120.0);
} else {
tmp = (60.0 / (z - t)) * (x - y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -5000000.0) or not ((a * 120.0) <= 4e-45): tmp = (-60.0 * (y / z)) + (a * 120.0) else: tmp = (60.0 / (z - t)) * (x - y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -5000000.0) || !(Float64(a * 120.0) <= 4e-45)) tmp = Float64(Float64(-60.0 * Float64(y / z)) + Float64(a * 120.0)); else tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((a * 120.0) <= -5000000.0) || ~(((a * 120.0) <= 4e-45))) tmp = (-60.0 * (y / z)) + (a * 120.0); else tmp = (60.0 / (z - t)) * (x - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -5000000.0], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 4e-45]], $MachinePrecision]], N[(N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5000000 \lor \neg \left(a \cdot 120 \leq 4 \cdot 10^{-45}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\end{array}
\end{array}
if (*.f64 a 120) < -5e6 or 3.99999999999999994e-45 < (*.f64 a 120) Initial program 98.5%
Taylor expanded in z around inf 73.4%
Taylor expanded in x around 0 77.9%
if -5e6 < (*.f64 a 120) < 3.99999999999999994e-45Initial program 99.8%
associate-*l/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 78.0%
associate-*r/78.1%
*-commutative78.1%
associate-*r/78.0%
Simplified78.0%
Final simplification78.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= y -1.12e+46)
t_1
(if (<= y -2.35e-151)
(* a 120.0)
(if (<= y -3.1e-159)
(* -60.0 (/ (- x y) t))
(if (<= y 2.6e+225) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (y <= -1.12e+46) {
tmp = t_1;
} else if (y <= -2.35e-151) {
tmp = a * 120.0;
} else if (y <= -3.1e-159) {
tmp = -60.0 * ((x - y) / t);
} else if (y <= 2.6e+225) {
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) * (y / (z - t))
if (y <= (-1.12d+46)) then
tmp = t_1
else if (y <= (-2.35d-151)) then
tmp = a * 120.0d0
else if (y <= (-3.1d-159)) then
tmp = (-60.0d0) * ((x - y) / t)
else if (y <= 2.6d+225) 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 * (y / (z - t));
double tmp;
if (y <= -1.12e+46) {
tmp = t_1;
} else if (y <= -2.35e-151) {
tmp = a * 120.0;
} else if (y <= -3.1e-159) {
tmp = -60.0 * ((x - y) / t);
} else if (y <= 2.6e+225) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if y <= -1.12e+46: tmp = t_1 elif y <= -2.35e-151: tmp = a * 120.0 elif y <= -3.1e-159: tmp = -60.0 * ((x - y) / t) elif y <= 2.6e+225: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (y <= -1.12e+46) tmp = t_1; elseif (y <= -2.35e-151) tmp = Float64(a * 120.0); elseif (y <= -3.1e-159) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); elseif (y <= 2.6e+225) 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 * (y / (z - t)); tmp = 0.0; if (y <= -1.12e+46) tmp = t_1; elseif (y <= -2.35e-151) tmp = a * 120.0; elseif (y <= -3.1e-159) tmp = -60.0 * ((x - y) / t); elseif (y <= 2.6e+225) 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[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.12e+46], t$95$1, If[LessEqual[y, -2.35e-151], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, -3.1e-159], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e+225], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;y \leq -1.12 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.35 \cdot 10^{-151}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{-159}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+225}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.12e46 or 2.60000000000000004e225 < y Initial program 99.9%
associate-*l/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 73.4%
if -1.12e46 < y < -2.35000000000000014e-151 or -3.1e-159 < y < 2.60000000000000004e225Initial program 98.7%
Taylor expanded in z around inf 63.7%
if -2.35000000000000014e-151 < y < -3.1e-159Initial program 100.0%
Taylor expanded in z around 0 89.5%
Taylor expanded in t around 0 89.5%
Final simplification67.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= y -7.2e+46)
t_1
(if (<= y -8.2e-141)
(* a 120.0)
(if (<= y -4.2e-256)
(* (/ 60.0 (- z t)) x)
(if (<= y 2.6e+225) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double tmp;
if (y <= -7.2e+46) {
tmp = t_1;
} else if (y <= -8.2e-141) {
tmp = a * 120.0;
} else if (y <= -4.2e-256) {
tmp = (60.0 / (z - t)) * x;
} else if (y <= 2.6e+225) {
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) * (y / (z - t))
if (y <= (-7.2d+46)) then
tmp = t_1
else if (y <= (-8.2d-141)) then
tmp = a * 120.0d0
else if (y <= (-4.2d-256)) then
tmp = (60.0d0 / (z - t)) * x
else if (y <= 2.6d+225) 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 * (y / (z - t));
double tmp;
if (y <= -7.2e+46) {
tmp = t_1;
} else if (y <= -8.2e-141) {
tmp = a * 120.0;
} else if (y <= -4.2e-256) {
tmp = (60.0 / (z - t)) * x;
} else if (y <= 2.6e+225) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) tmp = 0 if y <= -7.2e+46: tmp = t_1 elif y <= -8.2e-141: tmp = a * 120.0 elif y <= -4.2e-256: tmp = (60.0 / (z - t)) * x elif y <= 2.6e+225: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) tmp = 0.0 if (y <= -7.2e+46) tmp = t_1; elseif (y <= -8.2e-141) tmp = Float64(a * 120.0); elseif (y <= -4.2e-256) tmp = Float64(Float64(60.0 / Float64(z - t)) * x); elseif (y <= 2.6e+225) 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 * (y / (z - t)); tmp = 0.0; if (y <= -7.2e+46) tmp = t_1; elseif (y <= -8.2e-141) tmp = a * 120.0; elseif (y <= -4.2e-256) tmp = (60.0 / (z - t)) * x; elseif (y <= 2.6e+225) 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[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.2e+46], t$95$1, If[LessEqual[y, -8.2e-141], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, -4.2e-256], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 2.6e+225], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
\mathbf{if}\;y \leq -7.2 \cdot 10^{+46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -8.2 \cdot 10^{-141}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-256}:\\
\;\;\;\;\frac{60}{z - t} \cdot x\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+225}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -7.1999999999999997e46 or 2.60000000000000004e225 < y Initial program 99.9%
associate-*l/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 73.4%
if -7.1999999999999997e46 < y < -8.20000000000000005e-141 or -4.20000000000000005e-256 < y < 2.60000000000000004e225Initial program 98.6%
Taylor expanded in z around inf 65.3%
if -8.20000000000000005e-141 < y < -4.20000000000000005e-256Initial program 99.8%
associate-*l/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 63.8%
associate-*r/64.0%
associate-/l*64.2%
Simplified64.2%
associate-/r/63.8%
Applied egg-rr63.8%
Final simplification67.6%
(FPCore (x y z t a)
:precision binary64
(if (<= y -7.2e+46)
(* -60.0 (/ y (- z t)))
(if (<= y -1.75e-139)
(* a 120.0)
(if (<= y -2.1e-258)
(* (/ 60.0 (- z t)) x)
(if (<= y 2.6e+225) (* a 120.0) (/ -60.0 (/ (- z t) y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -7.2e+46) {
tmp = -60.0 * (y / (z - t));
} else if (y <= -1.75e-139) {
tmp = a * 120.0;
} else if (y <= -2.1e-258) {
tmp = (60.0 / (z - t)) * x;
} else if (y <= 2.6e+225) {
tmp = a * 120.0;
} else {
tmp = -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 (y <= (-7.2d+46)) then
tmp = (-60.0d0) * (y / (z - t))
else if (y <= (-1.75d-139)) then
tmp = a * 120.0d0
else if (y <= (-2.1d-258)) then
tmp = (60.0d0 / (z - t)) * x
else if (y <= 2.6d+225) then
tmp = a * 120.0d0
else
tmp = (-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 (y <= -7.2e+46) {
tmp = -60.0 * (y / (z - t));
} else if (y <= -1.75e-139) {
tmp = a * 120.0;
} else if (y <= -2.1e-258) {
tmp = (60.0 / (z - t)) * x;
} else if (y <= 2.6e+225) {
tmp = a * 120.0;
} else {
tmp = -60.0 / ((z - t) / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -7.2e+46: tmp = -60.0 * (y / (z - t)) elif y <= -1.75e-139: tmp = a * 120.0 elif y <= -2.1e-258: tmp = (60.0 / (z - t)) * x elif y <= 2.6e+225: tmp = a * 120.0 else: tmp = -60.0 / ((z - t) / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -7.2e+46) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (y <= -1.75e-139) tmp = Float64(a * 120.0); elseif (y <= -2.1e-258) tmp = Float64(Float64(60.0 / Float64(z - t)) * x); elseif (y <= 2.6e+225) tmp = Float64(a * 120.0); else tmp = 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 (y <= -7.2e+46) tmp = -60.0 * (y / (z - t)); elseif (y <= -1.75e-139) tmp = a * 120.0; elseif (y <= -2.1e-258) tmp = (60.0 / (z - t)) * x; elseif (y <= 2.6e+225) tmp = a * 120.0; else tmp = -60.0 / ((z - t) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -7.2e+46], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.75e-139], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, -2.1e-258], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 2.6e+225], N[(a * 120.0), $MachinePrecision], N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+46}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;y \leq -1.75 \cdot 10^{-139}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-258}:\\
\;\;\;\;\frac{60}{z - t} \cdot x\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+225}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}}\\
\end{array}
\end{array}
if y < -7.1999999999999997e46Initial program 99.9%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 68.2%
if -7.1999999999999997e46 < y < -1.75000000000000001e-139 or -2.0999999999999999e-258 < y < 2.60000000000000004e225Initial program 98.6%
Taylor expanded in z around inf 65.3%
if -1.75000000000000001e-139 < y < -2.0999999999999999e-258Initial program 99.8%
associate-*l/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 63.8%
associate-*r/64.0%
associate-/l*64.2%
Simplified64.2%
associate-/r/63.8%
Applied egg-rr63.8%
if 2.60000000000000004e225 < y Initial program 99.8%
associate-*l/99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 89.1%
associate-*r/89.2%
associate-/l*89.2%
Simplified89.2%
Final simplification67.6%
(FPCore (x y z t a)
:precision binary64
(if (<= y -6.4e+46)
(* -60.0 (/ y (- z t)))
(if (<= y -2.5e-139)
(* a 120.0)
(if (<= y -3e-257)
(/ 60.0 (/ (- z t) x))
(if (<= y 2.9e+227) (* a 120.0) (/ -60.0 (/ (- z t) y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -6.4e+46) {
tmp = -60.0 * (y / (z - t));
} else if (y <= -2.5e-139) {
tmp = a * 120.0;
} else if (y <= -3e-257) {
tmp = 60.0 / ((z - t) / x);
} else if (y <= 2.9e+227) {
tmp = a * 120.0;
} else {
tmp = -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 (y <= (-6.4d+46)) then
tmp = (-60.0d0) * (y / (z - t))
else if (y <= (-2.5d-139)) then
tmp = a * 120.0d0
else if (y <= (-3d-257)) then
tmp = 60.0d0 / ((z - t) / x)
else if (y <= 2.9d+227) then
tmp = a * 120.0d0
else
tmp = (-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 (y <= -6.4e+46) {
tmp = -60.0 * (y / (z - t));
} else if (y <= -2.5e-139) {
tmp = a * 120.0;
} else if (y <= -3e-257) {
tmp = 60.0 / ((z - t) / x);
} else if (y <= 2.9e+227) {
tmp = a * 120.0;
} else {
tmp = -60.0 / ((z - t) / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -6.4e+46: tmp = -60.0 * (y / (z - t)) elif y <= -2.5e-139: tmp = a * 120.0 elif y <= -3e-257: tmp = 60.0 / ((z - t) / x) elif y <= 2.9e+227: tmp = a * 120.0 else: tmp = -60.0 / ((z - t) / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -6.4e+46) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (y <= -2.5e-139) tmp = Float64(a * 120.0); elseif (y <= -3e-257) tmp = Float64(60.0 / Float64(Float64(z - t) / x)); elseif (y <= 2.9e+227) tmp = Float64(a * 120.0); else tmp = 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 (y <= -6.4e+46) tmp = -60.0 * (y / (z - t)); elseif (y <= -2.5e-139) tmp = a * 120.0; elseif (y <= -3e-257) tmp = 60.0 / ((z - t) / x); elseif (y <= 2.9e+227) tmp = a * 120.0; else tmp = -60.0 / ((z - t) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -6.4e+46], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.5e-139], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, -3e-257], N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e+227], N[(a * 120.0), $MachinePrecision], N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.4 \cdot 10^{+46}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-139}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq -3 \cdot 10^{-257}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x}}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+227}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}}\\
\end{array}
\end{array}
if y < -6.3999999999999996e46Initial program 99.9%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 68.2%
if -6.3999999999999996e46 < y < -2.50000000000000017e-139 or -2.9999999999999999e-257 < y < 2.8999999999999998e227Initial program 98.6%
Taylor expanded in z around inf 65.3%
if -2.50000000000000017e-139 < y < -2.9999999999999999e-257Initial program 99.8%
associate-*l/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 63.8%
associate-*r/64.0%
associate-/l*64.2%
Simplified64.2%
if 2.8999999999999998e227 < y Initial program 99.8%
associate-*l/99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 89.1%
associate-*r/89.2%
associate-/l*89.2%
Simplified89.2%
Final simplification67.7%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.2e+46)
(/ (* y -60.0) (- z t))
(if (<= y -8.2e-141)
(* a 120.0)
(if (<= y -4.2e-256)
(/ 60.0 (/ (- z t) x))
(if (<= y 2.7e+225) (* a 120.0) (/ -60.0 (/ (- z t) y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.2e+46) {
tmp = (y * -60.0) / (z - t);
} else if (y <= -8.2e-141) {
tmp = a * 120.0;
} else if (y <= -4.2e-256) {
tmp = 60.0 / ((z - t) / x);
} else if (y <= 2.7e+225) {
tmp = a * 120.0;
} else {
tmp = -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 (y <= (-1.2d+46)) then
tmp = (y * (-60.0d0)) / (z - t)
else if (y <= (-8.2d-141)) then
tmp = a * 120.0d0
else if (y <= (-4.2d-256)) then
tmp = 60.0d0 / ((z - t) / x)
else if (y <= 2.7d+225) then
tmp = a * 120.0d0
else
tmp = (-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 (y <= -1.2e+46) {
tmp = (y * -60.0) / (z - t);
} else if (y <= -8.2e-141) {
tmp = a * 120.0;
} else if (y <= -4.2e-256) {
tmp = 60.0 / ((z - t) / x);
} else if (y <= 2.7e+225) {
tmp = a * 120.0;
} else {
tmp = -60.0 / ((z - t) / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.2e+46: tmp = (y * -60.0) / (z - t) elif y <= -8.2e-141: tmp = a * 120.0 elif y <= -4.2e-256: tmp = 60.0 / ((z - t) / x) elif y <= 2.7e+225: tmp = a * 120.0 else: tmp = -60.0 / ((z - t) / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.2e+46) tmp = Float64(Float64(y * -60.0) / Float64(z - t)); elseif (y <= -8.2e-141) tmp = Float64(a * 120.0); elseif (y <= -4.2e-256) tmp = Float64(60.0 / Float64(Float64(z - t) / x)); elseif (y <= 2.7e+225) tmp = Float64(a * 120.0); else tmp = 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 (y <= -1.2e+46) tmp = (y * -60.0) / (z - t); elseif (y <= -8.2e-141) tmp = a * 120.0; elseif (y <= -4.2e-256) tmp = 60.0 / ((z - t) / x); elseif (y <= 2.7e+225) tmp = a * 120.0; else tmp = -60.0 / ((z - t) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.2e+46], N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8.2e-141], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, -4.2e-256], N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e+225], N[(a * 120.0), $MachinePrecision], N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+46}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\
\mathbf{elif}\;y \leq -8.2 \cdot 10^{-141}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-256}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x}}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+225}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}}\\
\end{array}
\end{array}
if y < -1.20000000000000004e46Initial program 99.9%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 68.2%
*-commutative68.2%
associate-*l/68.3%
Applied egg-rr68.3%
if -1.20000000000000004e46 < y < -8.20000000000000005e-141 or -4.20000000000000005e-256 < y < 2.6999999999999999e225Initial program 98.6%
Taylor expanded in z around inf 65.3%
if -8.20000000000000005e-141 < y < -4.20000000000000005e-256Initial program 99.8%
associate-*l/99.6%
Applied egg-rr99.6%
Taylor expanded in x around inf 63.8%
associate-*r/64.0%
associate-/l*64.2%
Simplified64.2%
if 2.6999999999999999e225 < y Initial program 99.8%
associate-*l/99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 89.1%
associate-*r/89.2%
associate-/l*89.2%
Simplified89.2%
Final simplification67.7%
(FPCore (x y z t a) :precision binary64 (+ (* (/ 60.0 (- z t)) (- x y)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 / (z - t)) * (x - y)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 / (z - t)) * (x - y)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 / (z - t)) * (x - y)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 / (z - t)) * (x - y)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 / 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[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{z - t} \cdot \left(x - y\right) + a \cdot 120
\end{array}
Initial program 99.1%
associate-*l/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -7.2e+46) (not (<= y 2.9e+225))) (* -60.0 (/ y (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -7.2e+46) || !(y <= 2.9e+225)) {
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 ((y <= (-7.2d+46)) .or. (.not. (y <= 2.9d+225))) 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 ((y <= -7.2e+46) || !(y <= 2.9e+225)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -7.2e+46) or not (y <= 2.9e+225): tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -7.2e+46) || !(y <= 2.9e+225)) 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 ((y <= -7.2e+46) || ~((y <= 2.9e+225))) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -7.2e+46], N[Not[LessEqual[y, 2.9e+225]], $MachinePrecision]], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+46} \lor \neg \left(y \leq 2.9 \cdot 10^{+225}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -7.1999999999999997e46 or 2.9000000000000001e225 < y Initial program 99.9%
associate-*l/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 73.4%
if -7.1999999999999997e46 < y < 2.9000000000000001e225Initial program 98.8%
Taylor expanded in z around inf 62.1%
Final simplification65.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.5e+99) (not (<= y 3.7e+233))) (* -60.0 (/ y z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.5e+99) || !(y <= 3.7e+233)) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.5d+99)) .or. (.not. (y <= 3.7d+233))) then
tmp = (-60.0d0) * (y / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.5e+99) || !(y <= 3.7e+233)) {
tmp = -60.0 * (y / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.5e+99) or not (y <= 3.7e+233): tmp = -60.0 * (y / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.5e+99) || !(y <= 3.7e+233)) tmp = Float64(-60.0 * Float64(y / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.5e+99) || ~((y <= 3.7e+233))) tmp = -60.0 * (y / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.5e+99], N[Not[LessEqual[y, 3.7e+233]], $MachinePrecision]], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+99} \lor \neg \left(y \leq 3.7 \cdot 10^{+233}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -1.50000000000000007e99 or 3.6999999999999998e233 < y Initial program 99.8%
associate-*l/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 77.9%
Taylor expanded in z around inf 54.5%
if -1.50000000000000007e99 < y < 3.6999999999999998e233Initial program 98.8%
Taylor expanded in z around inf 60.9%
Final simplification59.3%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.4e+99) (* -60.0 (/ y z)) (if (<= y 6.9e+233) (* a 120.0) (/ (* y -60.0) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.4e+99) {
tmp = -60.0 * (y / z);
} else if (y <= 6.9e+233) {
tmp = a * 120.0;
} else {
tmp = (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 (y <= (-1.4d+99)) then
tmp = (-60.0d0) * (y / z)
else if (y <= 6.9d+233) then
tmp = a * 120.0d0
else
tmp = (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 (y <= -1.4e+99) {
tmp = -60.0 * (y / z);
} else if (y <= 6.9e+233) {
tmp = a * 120.0;
} else {
tmp = (y * -60.0) / z;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.4e+99: tmp = -60.0 * (y / z) elif y <= 6.9e+233: tmp = a * 120.0 else: tmp = (y * -60.0) / z return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.4e+99) tmp = Float64(-60.0 * Float64(y / z)); elseif (y <= 6.9e+233) tmp = Float64(a * 120.0); else tmp = Float64(Float64(y * -60.0) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.4e+99) tmp = -60.0 * (y / z); elseif (y <= 6.9e+233) tmp = a * 120.0; else tmp = (y * -60.0) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.4e+99], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.9e+233], N[(a * 120.0), $MachinePrecision], N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+99}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 6.9 \cdot 10^{+233}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z}\\
\end{array}
\end{array}
if y < -1.4e99Initial program 99.9%
associate-*l/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 73.6%
Taylor expanded in z around inf 51.4%
if -1.4e99 < y < 6.8999999999999996e233Initial program 98.8%
Taylor expanded in z around inf 60.9%
if 6.8999999999999996e233 < y Initial program 99.8%
Taylor expanded in z around inf 73.0%
Taylor expanded in x around 0 73.0%
+-commutative73.0%
fma-def73.0%
Applied egg-rr73.0%
Taylor expanded in a around 0 61.9%
associate-*r/62.0%
Simplified62.0%
Final simplification59.3%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.3e+167) (* -60.0 (/ x t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.3e+167) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-1.3d+167)) then
tmp = (-60.0d0) * (x / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.3e+167) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.3e+167: tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.3e+167) tmp = Float64(-60.0 * Float64(x / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.3e+167) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.3e+167], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+167}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.3000000000000001e167Initial program 97.0%
associate-*l/99.7%
Applied egg-rr99.7%
Taylor expanded in x around inf 67.0%
associate-*r/64.3%
associate-/l*67.1%
Simplified67.1%
Taylor expanded in z around 0 44.2%
if -1.3000000000000001e167 < x Initial program 99.4%
Taylor expanded in z around inf 53.3%
Final simplification52.1%
(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.1%
Taylor expanded in z around inf 49.7%
Final simplification49.7%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2023318
(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)))