
(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 16 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.4%
+-commutative99.4%
fma-def99.4%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -1e+25) (* a 120.0) (if (<= (* a 120.0) 1e+74) (* 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) <= -1e+25) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e+74) {
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) <= (-1d+25)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 1d+74) 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) <= -1e+25) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1e+74) {
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) <= -1e+25: tmp = a * 120.0 elif (a * 120.0) <= 1e+74: 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) <= -1e+25) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 1e+74) 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) <= -1e+25) tmp = a * 120.0; elseif ((a * 120.0) <= 1e+74) 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], -1e+25], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+74], 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 -1 \cdot 10^{+25}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10^{+74}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1.00000000000000009e25 or 9.99999999999999952e73 < (*.f64 a 120) Initial program 99.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 80.6%
if -1.00000000000000009e25 < (*.f64 a 120) < 9.99999999999999952e73Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.1%
Final simplification80.9%
(FPCore (x y z t a) :precision binary64 (if (<= (* a 120.0) -1e+25) (+ (/ y (/ t 60.0)) (* a 120.0)) (if (<= (* a 120.0) 1e+74) (* 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) <= -1e+25) {
tmp = (y / (t / 60.0)) + (a * 120.0);
} else if ((a * 120.0) <= 1e+74) {
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) <= (-1d+25)) then
tmp = (y / (t / 60.0d0)) + (a * 120.0d0)
else if ((a * 120.0d0) <= 1d+74) 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) <= -1e+25) {
tmp = (y / (t / 60.0)) + (a * 120.0);
} else if ((a * 120.0) <= 1e+74) {
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) <= -1e+25: tmp = (y / (t / 60.0)) + (a * 120.0) elif (a * 120.0) <= 1e+74: 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) <= -1e+25) tmp = Float64(Float64(y / Float64(t / 60.0)) + Float64(a * 120.0)); elseif (Float64(a * 120.0) <= 1e+74) 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) <= -1e+25) tmp = (y / (t / 60.0)) + (a * 120.0); elseif ((a * 120.0) <= 1e+74) 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], -1e+25], N[(N[(y / N[(t / 60.0), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e+74], 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 -1 \cdot 10^{+25}:\\
\;\;\;\;\frac{y}{\frac{t}{60}} + a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10^{+74}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1.00000000000000009e25Initial program 98.4%
Taylor expanded in x around 0 89.6%
Taylor expanded in z around 0 79.6%
associate-*r/79.6%
*-commutative79.6%
associate-/l*79.6%
Simplified79.6%
if -1.00000000000000009e25 < (*.f64 a 120) < 9.99999999999999952e73Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.1%
if 9.99999999999999952e73 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 83.5%
Final simplification81.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= y -2.8e+138)
t_1
(if (<= y 1.8e-122)
(* a 120.0)
(if (<= y 1.9e-110)
(* 60.0 (/ x (- z t)))
(if (<= y 9.8e+98) (* 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 <= -2.8e+138) {
tmp = t_1;
} else if (y <= 1.8e-122) {
tmp = a * 120.0;
} else if (y <= 1.9e-110) {
tmp = 60.0 * (x / (z - t));
} else if (y <= 9.8e+98) {
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 <= (-2.8d+138)) then
tmp = t_1
else if (y <= 1.8d-122) then
tmp = a * 120.0d0
else if (y <= 1.9d-110) then
tmp = 60.0d0 * (x / (z - t))
else if (y <= 9.8d+98) 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 <= -2.8e+138) {
tmp = t_1;
} else if (y <= 1.8e-122) {
tmp = a * 120.0;
} else if (y <= 1.9e-110) {
tmp = 60.0 * (x / (z - t));
} else if (y <= 9.8e+98) {
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 <= -2.8e+138: tmp = t_1 elif y <= 1.8e-122: tmp = a * 120.0 elif y <= 1.9e-110: tmp = 60.0 * (x / (z - t)) elif y <= 9.8e+98: 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 <= -2.8e+138) tmp = t_1; elseif (y <= 1.8e-122) tmp = Float64(a * 120.0); elseif (y <= 1.9e-110) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (y <= 9.8e+98) 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 <= -2.8e+138) tmp = t_1; elseif (y <= 1.8e-122) tmp = a * 120.0; elseif (y <= 1.9e-110) tmp = 60.0 * (x / (z - t)); elseif (y <= 9.8e+98) 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, -2.8e+138], t$95$1, If[LessEqual[y, 1.8e-122], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, 1.9e-110], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.8e+98], 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 -2.8 \cdot 10^{+138}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-122}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-110}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{+98}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.8000000000000001e138 or 9.79999999999999958e98 < y Initial program 98.6%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 72.4%
if -2.8000000000000001e138 < y < 1.79999999999999997e-122 or 1.8999999999999999e-110 < y < 9.79999999999999958e98Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.2%
if 1.79999999999999997e-122 < y < 1.8999999999999999e-110Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
associate-/r/100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 99.7%
Final simplification64.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))))
(if (<= y -7.6e+140)
t_1
(if (<= y 6e-119)
(* a 120.0)
(if (<= y 1.9e-110)
(* (/ 60.0 (- z t)) x)
(if (<= y 9.8e+98) (* 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.6e+140) {
tmp = t_1;
} else if (y <= 6e-119) {
tmp = a * 120.0;
} else if (y <= 1.9e-110) {
tmp = (60.0 / (z - t)) * x;
} else if (y <= 9.8e+98) {
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.6d+140)) then
tmp = t_1
else if (y <= 6d-119) then
tmp = a * 120.0d0
else if (y <= 1.9d-110) then
tmp = (60.0d0 / (z - t)) * x
else if (y <= 9.8d+98) 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.6e+140) {
tmp = t_1;
} else if (y <= 6e-119) {
tmp = a * 120.0;
} else if (y <= 1.9e-110) {
tmp = (60.0 / (z - t)) * x;
} else if (y <= 9.8e+98) {
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.6e+140: tmp = t_1 elif y <= 6e-119: tmp = a * 120.0 elif y <= 1.9e-110: tmp = (60.0 / (z - t)) * x elif y <= 9.8e+98: 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.6e+140) tmp = t_1; elseif (y <= 6e-119) tmp = Float64(a * 120.0); elseif (y <= 1.9e-110) tmp = Float64(Float64(60.0 / Float64(z - t)) * x); elseif (y <= 9.8e+98) 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.6e+140) tmp = t_1; elseif (y <= 6e-119) tmp = a * 120.0; elseif (y <= 1.9e-110) tmp = (60.0 / (z - t)) * x; elseif (y <= 9.8e+98) 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.6e+140], t$95$1, If[LessEqual[y, 6e-119], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, 1.9e-110], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 9.8e+98], 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.6 \cdot 10^{+140}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-119}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-110}:\\
\;\;\;\;\frac{60}{z - t} \cdot x\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{+98}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -7.6000000000000002e140 or 9.79999999999999958e98 < y Initial program 98.6%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 72.4%
if -7.6000000000000002e140 < y < 6.0000000000000004e-119 or 1.8999999999999999e-110 < y < 9.79999999999999958e98Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.2%
if 6.0000000000000004e-119 < y < 1.8999999999999999e-110Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
associate-/r/100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 99.7%
associate-*r/99.5%
associate-/l*99.7%
Simplified99.7%
associate-/r/100.0%
Applied egg-rr100.0%
Final simplification64.4%
(FPCore (x y z t a)
:precision binary64
(if (<= y -3.8e+139)
(* -60.0 (/ y (- z t)))
(if (<= y 9.6e-119)
(* a 120.0)
(if (<= y 2.8e-110)
(* (/ 60.0 (- z t)) x)
(if (<= y 3.6e+98) (* a 120.0) (/ -60.0 (/ (- z t) y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -3.8e+139) {
tmp = -60.0 * (y / (z - t));
} else if (y <= 9.6e-119) {
tmp = a * 120.0;
} else if (y <= 2.8e-110) {
tmp = (60.0 / (z - t)) * x;
} else if (y <= 3.6e+98) {
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 <= (-3.8d+139)) then
tmp = (-60.0d0) * (y / (z - t))
else if (y <= 9.6d-119) then
tmp = a * 120.0d0
else if (y <= 2.8d-110) then
tmp = (60.0d0 / (z - t)) * x
else if (y <= 3.6d+98) 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 <= -3.8e+139) {
tmp = -60.0 * (y / (z - t));
} else if (y <= 9.6e-119) {
tmp = a * 120.0;
} else if (y <= 2.8e-110) {
tmp = (60.0 / (z - t)) * x;
} else if (y <= 3.6e+98) {
tmp = a * 120.0;
} else {
tmp = -60.0 / ((z - t) / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -3.8e+139: tmp = -60.0 * (y / (z - t)) elif y <= 9.6e-119: tmp = a * 120.0 elif y <= 2.8e-110: tmp = (60.0 / (z - t)) * x elif y <= 3.6e+98: 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 <= -3.8e+139) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (y <= 9.6e-119) tmp = Float64(a * 120.0); elseif (y <= 2.8e-110) tmp = Float64(Float64(60.0 / Float64(z - t)) * x); elseif (y <= 3.6e+98) 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 <= -3.8e+139) tmp = -60.0 * (y / (z - t)); elseif (y <= 9.6e-119) tmp = a * 120.0; elseif (y <= 2.8e-110) tmp = (60.0 / (z - t)) * x; elseif (y <= 3.6e+98) 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, -3.8e+139], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.6e-119], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, 2.8e-110], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 3.6e+98], 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 -3.8 \cdot 10^{+139}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{-119}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-110}:\\
\;\;\;\;\frac{60}{z - t} \cdot x\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+98}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}}\\
\end{array}
\end{array}
if y < -3.79999999999999999e139Initial program 97.4%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 82.5%
if -3.79999999999999999e139 < y < 9.60000000000000034e-119 or 2.8e-110 < y < 3.59999999999999981e98Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.2%
if 9.60000000000000034e-119 < y < 2.8e-110Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
associate-/r/100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 99.7%
associate-*r/99.5%
associate-/l*99.7%
Simplified99.7%
associate-/r/100.0%
Applied egg-rr100.0%
if 3.59999999999999981e98 < y Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 63.2%
associate-*r/63.1%
associate-/l*63.2%
Simplified63.2%
Final simplification64.4%
(FPCore (x y z t a)
:precision binary64
(if (<= y -2.25e+138)
(/ (* y -60.0) (- z t))
(if (<= y 1.2e-121)
(* a 120.0)
(if (<= y 1.9e-110)
(* (/ 60.0 (- z t)) x)
(if (<= y 6.5e+98) (* a 120.0) (/ -60.0 (/ (- z t) y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.25e+138) {
tmp = (y * -60.0) / (z - t);
} else if (y <= 1.2e-121) {
tmp = a * 120.0;
} else if (y <= 1.9e-110) {
tmp = (60.0 / (z - t)) * x;
} else if (y <= 6.5e+98) {
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 <= (-2.25d+138)) then
tmp = (y * (-60.0d0)) / (z - t)
else if (y <= 1.2d-121) then
tmp = a * 120.0d0
else if (y <= 1.9d-110) then
tmp = (60.0d0 / (z - t)) * x
else if (y <= 6.5d+98) 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 <= -2.25e+138) {
tmp = (y * -60.0) / (z - t);
} else if (y <= 1.2e-121) {
tmp = a * 120.0;
} else if (y <= 1.9e-110) {
tmp = (60.0 / (z - t)) * x;
} else if (y <= 6.5e+98) {
tmp = a * 120.0;
} else {
tmp = -60.0 / ((z - t) / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.25e+138: tmp = (y * -60.0) / (z - t) elif y <= 1.2e-121: tmp = a * 120.0 elif y <= 1.9e-110: tmp = (60.0 / (z - t)) * x elif y <= 6.5e+98: 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 <= -2.25e+138) tmp = Float64(Float64(y * -60.0) / Float64(z - t)); elseif (y <= 1.2e-121) tmp = Float64(a * 120.0); elseif (y <= 1.9e-110) tmp = Float64(Float64(60.0 / Float64(z - t)) * x); elseif (y <= 6.5e+98) 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 <= -2.25e+138) tmp = (y * -60.0) / (z - t); elseif (y <= 1.2e-121) tmp = a * 120.0; elseif (y <= 1.9e-110) tmp = (60.0 / (z - t)) * x; elseif (y <= 6.5e+98) 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, -2.25e+138], N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e-121], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, 1.9e-110], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 6.5e+98], 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 -2.25 \cdot 10^{+138}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-121}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-110}:\\
\;\;\;\;\frac{60}{z - t} \cdot x\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+98}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}}\\
\end{array}
\end{array}
if y < -2.24999999999999991e138Initial program 97.4%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 82.5%
associate-*r/82.6%
Simplified82.6%
if -2.24999999999999991e138 < y < 1.20000000000000002e-121 or 1.8999999999999999e-110 < y < 6.4999999999999999e98Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 59.2%
if 1.20000000000000002e-121 < y < 1.8999999999999999e-110Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
associate-/r/100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 99.7%
associate-*r/99.5%
associate-/l*99.7%
Simplified99.7%
associate-/r/100.0%
Applied egg-rr100.0%
if 6.4999999999999999e98 < y Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 63.2%
associate-*r/63.1%
associate-/l*63.2%
Simplified63.2%
Final simplification64.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -7.4e+140) (not (<= y 5.4e+104))) (/ (* 60.0 (- x y)) (- z t)) (+ (* a 120.0) (* (/ 60.0 (- z t)) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -7.4e+140) || !(y <= 5.4e+104)) {
tmp = (60.0 * (x - y)) / (z - t);
} else {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
}
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.4d+140)) .or. (.not. (y <= 5.4d+104))) then
tmp = (60.0d0 * (x - y)) / (z - t)
else
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
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.4e+140) || !(y <= 5.4e+104)) {
tmp = (60.0 * (x - y)) / (z - t);
} else {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -7.4e+140) or not (y <= 5.4e+104): tmp = (60.0 * (x - y)) / (z - t) else: tmp = (a * 120.0) + ((60.0 / (z - t)) * x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -7.4e+140) || !(y <= 5.4e+104)) tmp = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -7.4e+140) || ~((y <= 5.4e+104))) tmp = (60.0 * (x - y)) / (z - t); else tmp = (a * 120.0) + ((60.0 / (z - t)) * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -7.4e+140], N[Not[LessEqual[y, 5.4e+104]], $MachinePrecision]], N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{+140} \lor \neg \left(y \leq 5.4 \cdot 10^{+104}\right):\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\end{array}
\end{array}
if y < -7.40000000000000006e140 or 5.39999999999999969e104 < y Initial program 98.5%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 83.9%
associate-*r/83.9%
Simplified83.9%
if -7.40000000000000006e140 < y < 5.39999999999999969e104Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 88.7%
associate-*r/88.7%
associate-*l/88.7%
*-commutative88.7%
Simplified88.7%
Final simplification87.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.25e+124) (not (<= y 6.4e+105))) (+ (* y (/ -60.0 (- z t))) (* a 120.0)) (+ (* a 120.0) (* (/ 60.0 (- z t)) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.25e+124) || !(y <= 6.4e+105)) {
tmp = (y * (-60.0 / (z - t))) + (a * 120.0);
} else {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
}
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.25d+124)) .or. (.not. (y <= 6.4d+105))) then
tmp = (y * ((-60.0d0) / (z - t))) + (a * 120.0d0)
else
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
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.25e+124) || !(y <= 6.4e+105)) {
tmp = (y * (-60.0 / (z - t))) + (a * 120.0);
} else {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.25e+124) or not (y <= 6.4e+105): tmp = (y * (-60.0 / (z - t))) + (a * 120.0) else: tmp = (a * 120.0) + ((60.0 / (z - t)) * x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.25e+124) || !(y <= 6.4e+105)) tmp = Float64(Float64(y * Float64(-60.0 / Float64(z - t))) + Float64(a * 120.0)); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.25e+124) || ~((y <= 6.4e+105))) tmp = (y * (-60.0 / (z - t))) + (a * 120.0); else tmp = (a * 120.0) + ((60.0 / (z - t)) * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.25e+124], N[Not[LessEqual[y, 6.4e+105]], $MachinePrecision]], N[(N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+124} \lor \neg \left(y \leq 6.4 \cdot 10^{+105}\right):\\
\;\;\;\;y \cdot \frac{-60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\end{array}
\end{array}
if y < -1.2499999999999999e124 or 6.4e105 < y Initial program 98.5%
Taylor expanded in x around 0 90.8%
associate-/l*92.0%
associate-/r/92.0%
Applied egg-rr92.0%
if -1.2499999999999999e124 < y < 6.4e105Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 89.1%
associate-*r/89.1%
associate-*l/89.1%
*-commutative89.1%
Simplified89.1%
Final simplification90.0%
(FPCore (x y z t a)
:precision binary64
(if (<= y -2e+124)
(+ (* y (/ -60.0 (- z t))) (* a 120.0))
(if (<= y 3.8e+106)
(+ (* a 120.0) (* (/ 60.0 (- z t)) x))
(+ (/ -60.0 (/ (- z t) y)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2e+124) {
tmp = (y * (-60.0 / (z - t))) + (a * 120.0);
} else if (y <= 3.8e+106) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-2d+124)) then
tmp = (y * ((-60.0d0) / (z - t))) + (a * 120.0d0)
else if (y <= 3.8d+106) then
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
else
tmp = ((-60.0d0) / ((z - t) / y)) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2e+124) {
tmp = (y * (-60.0 / (z - t))) + (a * 120.0);
} else if (y <= 3.8e+106) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2e+124: tmp = (y * (-60.0 / (z - t))) + (a * 120.0) elif y <= 3.8e+106: tmp = (a * 120.0) + ((60.0 / (z - t)) * x) else: tmp = (-60.0 / ((z - t) / y)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2e+124) tmp = Float64(Float64(y * Float64(-60.0 / Float64(z - t))) + Float64(a * 120.0)); elseif (y <= 3.8e+106) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); else tmp = Float64(Float64(-60.0 / Float64(Float64(z - t) / y)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2e+124) tmp = (y * (-60.0 / (z - t))) + (a * 120.0); elseif (y <= 3.8e+106) tmp = (a * 120.0) + ((60.0 / (z - t)) * x); else tmp = (-60.0 / ((z - t) / y)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2e+124], N[(N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e+106], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+124}:\\
\;\;\;\;y \cdot \frac{-60}{z - t} + a \cdot 120\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+106}:\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\
\end{array}
\end{array}
if y < -1.9999999999999999e124Initial program 97.6%
Taylor expanded in x around 0 95.3%
associate-/l*97.4%
associate-/r/97.4%
Applied egg-rr97.4%
if -1.9999999999999999e124 < y < 3.7999999999999998e106Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 89.1%
associate-*r/89.1%
associate-*l/89.1%
*-commutative89.1%
Simplified89.1%
if 3.7999999999999998e106 < y Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 85.5%
associate-*r/85.4%
associate-/l*85.6%
Simplified85.6%
Final simplification90.0%
(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.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 (+ (/ 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 (if (or (<= y -2.9e+138) (not (<= y 4.2e+98))) (* -60.0 (/ y (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.9e+138) || !(y <= 4.2e+98)) {
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 <= (-2.9d+138)) .or. (.not. (y <= 4.2d+98))) 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 <= -2.9e+138) || !(y <= 4.2e+98)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.9e+138) or not (y <= 4.2e+98): 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 <= -2.9e+138) || !(y <= 4.2e+98)) 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 <= -2.9e+138) || ~((y <= 4.2e+98))) 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, -2.9e+138], N[Not[LessEqual[y, 4.2e+98]], $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 -2.9 \cdot 10^{+138} \lor \neg \left(y \leq 4.2 \cdot 10^{+98}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -2.9000000000000001e138 or 4.20000000000000008e98 < y Initial program 98.6%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 72.4%
if -2.9000000000000001e138 < y < 4.20000000000000008e98Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 57.3%
Final simplification62.1%
(FPCore (x y z t a) :precision binary64 (if (<= y -2.5e+145) (/ -60.0 (/ z y)) (if (<= y 2.4e+105) (* a 120.0) (/ -60.0 (- (/ t y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.5e+145) {
tmp = -60.0 / (z / y);
} else if (y <= 2.4e+105) {
tmp = a * 120.0;
} else {
tmp = -60.0 / -(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 <= (-2.5d+145)) then
tmp = (-60.0d0) / (z / y)
else if (y <= 2.4d+105) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) / -(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 <= -2.5e+145) {
tmp = -60.0 / (z / y);
} else if (y <= 2.4e+105) {
tmp = a * 120.0;
} else {
tmp = -60.0 / -(t / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.5e+145: tmp = -60.0 / (z / y) elif y <= 2.4e+105: tmp = a * 120.0 else: tmp = -60.0 / -(t / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.5e+145) tmp = Float64(-60.0 / Float64(z / y)); elseif (y <= 2.4e+105) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 / Float64(-Float64(t / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.5e+145) tmp = -60.0 / (z / y); elseif (y <= 2.4e+105) tmp = a * 120.0; else tmp = -60.0 / -(t / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.5e+145], N[(-60.0 / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+105], N[(a * 120.0), $MachinePrecision], N[(-60.0 / (-N[(t / y), $MachinePrecision])), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.5 \cdot 10^{+145}:\\
\;\;\;\;\frac{-60}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+105}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{-\frac{t}{y}}\\
\end{array}
\end{array}
if y < -2.49999999999999983e145Initial program 97.3%
associate-/l*99.6%
Simplified99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 82.0%
associate-*r/82.1%
associate-/l*81.9%
Simplified81.9%
Taylor expanded in z around inf 47.2%
if -2.49999999999999983e145 < y < 2.39999999999999975e105Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 56.5%
if 2.39999999999999975e105 < y Initial program 99.6%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in y around inf 65.9%
associate-*r/65.8%
associate-/l*66.0%
Simplified66.0%
Taylor expanded in z around 0 41.5%
neg-mul-141.5%
distribute-neg-frac41.5%
Simplified41.5%
Final simplification52.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.85e+149) (not (<= y 6e+98))) (/ -60.0 (/ z y)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.85e+149) || !(y <= 6e+98)) {
tmp = -60.0 / (z / y);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.85d+149)) .or. (.not. (y <= 6d+98))) then
tmp = (-60.0d0) / (z / y)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.85e+149) || !(y <= 6e+98)) {
tmp = -60.0 / (z / y);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.85e+149) or not (y <= 6e+98): tmp = -60.0 / (z / y) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.85e+149) || !(y <= 6e+98)) tmp = Float64(-60.0 / Float64(z / y)); 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.85e+149) || ~((y <= 6e+98))) tmp = -60.0 / (z / y); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.85e+149], N[Not[LessEqual[y, 6e+98]], $MachinePrecision]], N[(-60.0 / N[(z / y), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+149} \lor \neg \left(y \leq 6 \cdot 10^{+98}\right):\\
\;\;\;\;\frac{-60}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -1.84999999999999989e149 or 6.0000000000000003e98 < y Initial program 98.6%
associate-/l*99.7%
Simplified99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 72.0%
associate-*r/72.0%
associate-/l*72.0%
Simplified72.0%
Taylor expanded in z around inf 41.1%
if -1.84999999999999989e149 < y < 6.0000000000000003e98Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 57.0%
Final simplification51.9%
(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 45.1%
Final simplification45.1%
(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 2023240
(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)))