
(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 (- x y) (/ 60.0 (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return fma((x - y), (60.0 / (z - t)), (a * 120.0));
}
function code(x, y, z, t, a) return fma(Float64(x - y), Float64(60.0 / Float64(z - t)), Float64(a * 120.0)) end
code[x_, y_, z_, t_, a_] := N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x - y, \frac{60}{z - t}, a \cdot 120\right)
\end{array}
Initial program 99.8%
*-commutative99.8%
associate-*r/99.8%
fma-def99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* a 120.0) (* -60.0 (/ (- x y) t)))))
(if (<= t -8.5e-29)
t_1
(if (<= t 3.5e-289)
(+ (* a 120.0) (* x (/ 60.0 z)))
(if (<= t 6e-51) (+ (* a 120.0) (* -60.0 (/ y z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (-60.0 * ((x - y) / t));
double tmp;
if (t <= -8.5e-29) {
tmp = t_1;
} else if (t <= 3.5e-289) {
tmp = (a * 120.0) + (x * (60.0 / z));
} else if (t <= 6e-51) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (a * 120.0d0) + ((-60.0d0) * ((x - y) / t))
if (t <= (-8.5d-29)) then
tmp = t_1
else if (t <= 3.5d-289) then
tmp = (a * 120.0d0) + (x * (60.0d0 / z))
else if (t <= 6d-51) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (a * 120.0) + (-60.0 * ((x - y) / t));
double tmp;
if (t <= -8.5e-29) {
tmp = t_1;
} else if (t <= 3.5e-289) {
tmp = (a * 120.0) + (x * (60.0 / z));
} else if (t <= 6e-51) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (a * 120.0) + (-60.0 * ((x - y) / t)) tmp = 0 if t <= -8.5e-29: tmp = t_1 elif t <= 3.5e-289: tmp = (a * 120.0) + (x * (60.0 / z)) elif t <= 6e-51: tmp = (a * 120.0) + (-60.0 * (y / z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(Float64(x - y) / t))) tmp = 0.0 if (t <= -8.5e-29) tmp = t_1; elseif (t <= 3.5e-289) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / z))); elseif (t <= 6e-51) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (a * 120.0) + (-60.0 * ((x - y) / t)); tmp = 0.0; if (t <= -8.5e-29) tmp = t_1; elseif (t <= 3.5e-289) tmp = (a * 120.0) + (x * (60.0 / z)); elseif (t <= 6e-51) tmp = (a * 120.0) + (-60.0 * (y / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.5e-29], t$95$1, If[LessEqual[t, 3.5e-289], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-51], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot 120 + -60 \cdot \frac{x - y}{t}\\
\mathbf{if}\;t \leq -8.5 \cdot 10^{-29}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-289}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z}\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-51}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -8.5000000000000001e-29 or 6.00000000000000005e-51 < t Initial program 99.8%
Taylor expanded in z around 0 85.4%
if -8.5000000000000001e-29 < t < 3.4999999999999999e-289Initial program 99.8%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 92.6%
Taylor expanded in x around inf 76.6%
associate-*r/76.7%
*-commutative76.7%
associate-*r/76.7%
Simplified76.7%
if 3.4999999999999999e-289 < t < 6.00000000000000005e-51Initial program 99.8%
Taylor expanded in x around 0 78.3%
Taylor expanded in z around inf 71.3%
Final simplification80.7%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e+72)
(+ (* a 120.0) (* -60.0 (/ x t)))
(if (<= (* a 120.0) 200000000000.0)
(* 60.0 (/ (- x y) (- z t)))
(* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+72) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 200000000000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-5d+72)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
else if ((a * 120.0d0) <= 200000000000.0d0) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+72) {
tmp = (a * 120.0) + (-60.0 * (x / t));
} else if ((a * 120.0) <= 200000000000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e+72: tmp = (a * 120.0) + (-60.0 * (x / t)) elif (a * 120.0) <= 200000000000.0: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e+72) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); elseif (Float64(a * 120.0) <= 200000000000.0) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e+72) tmp = (a * 120.0) + (-60.0 * (x / t)); elseif ((a * 120.0) <= 200000000000.0) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+72], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 200000000000.0], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+72}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 200000000000:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.99999999999999992e72Initial program 99.9%
Taylor expanded in z around 0 85.0%
Taylor expanded in x around inf 79.7%
if -4.99999999999999992e72 < (*.f64 a 120) < 2e11Initial program 99.7%
Taylor expanded in a around 0 74.3%
if 2e11 < (*.f64 a 120) Initial program 99.9%
Taylor expanded in z around inf 75.1%
Final simplification75.6%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e+72)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= (* a 120.0) 200000000000.0)
(* 60.0 (/ (- x y) (- z t)))
(* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+72) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 200000000000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-5d+72)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if ((a * 120.0d0) <= 200000000000.0d0) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+72) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 200000000000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e+72: tmp = (a * 120.0) + (60.0 * (y / t)) elif (a * 120.0) <= 200000000000.0: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e+72) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= 200000000000.0) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e+72) tmp = (a * 120.0) + (60.0 * (y / t)); elseif ((a * 120.0) <= 200000000000.0) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+72], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 200000000000.0], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+72}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 200000000000:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.99999999999999992e72Initial program 99.9%
Taylor expanded in z around 0 85.0%
Taylor expanded in x around 0 82.1%
if -4.99999999999999992e72 < (*.f64 a 120) < 2e11Initial program 99.7%
Taylor expanded in a around 0 74.3%
if 2e11 < (*.f64 a 120) Initial program 99.9%
Taylor expanded in z around inf 75.1%
Final simplification76.1%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e+72)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= (* a 120.0) 200000000000.0)
(/ 60.0 (/ (- z t) (- x y)))
(* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+72) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 200000000000.0) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-5d+72)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if ((a * 120.0d0) <= 200000000000.0d0) then
tmp = 60.0d0 / ((z - t) / (x - y))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+72) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 200000000000.0) {
tmp = 60.0 / ((z - t) / (x - y));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e+72: tmp = (a * 120.0) + (60.0 * (y / t)) elif (a * 120.0) <= 200000000000.0: tmp = 60.0 / ((z - t) / (x - y)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e+72) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= 200000000000.0) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e+72) tmp = (a * 120.0) + (60.0 * (y / t)); elseif ((a * 120.0) <= 200000000000.0) tmp = 60.0 / ((z - t) / (x - y)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+72], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 200000000000.0], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+72}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 200000000000:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.99999999999999992e72Initial program 99.9%
Taylor expanded in z around 0 85.0%
Taylor expanded in x around 0 82.1%
if -4.99999999999999992e72 < (*.f64 a 120) < 2e11Initial program 99.7%
Taylor expanded in a around 0 74.3%
clear-num74.3%
un-div-inv74.3%
Applied egg-rr74.3%
if 2e11 < (*.f64 a 120) Initial program 99.9%
Taylor expanded in z around inf 75.1%
Final simplification76.1%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e+72)
(+ (* a 120.0) (* 60.0 (/ y t)))
(if (<= (* a 120.0) 200000000000.0)
(/ (* (- x y) 60.0) (- z t))
(* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+72) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 200000000000.0) {
tmp = ((x - y) * 60.0) / (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) <= (-5d+72)) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
else if ((a * 120.0d0) <= 200000000000.0d0) then
tmp = ((x - y) * 60.0d0) / (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) <= -5e+72) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else if ((a * 120.0) <= 200000000000.0) {
tmp = ((x - y) * 60.0) / (z - t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e+72: tmp = (a * 120.0) + (60.0 * (y / t)) elif (a * 120.0) <= 200000000000.0: tmp = ((x - y) * 60.0) / (z - t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e+72) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); elseif (Float64(a * 120.0) <= 200000000000.0) tmp = Float64(Float64(Float64(x - y) * 60.0) / 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) <= -5e+72) tmp = (a * 120.0) + (60.0 * (y / t)); elseif ((a * 120.0) <= 200000000000.0) tmp = ((x - y) * 60.0) / (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], -5e+72], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 200000000000.0], N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+72}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{elif}\;a \cdot 120 \leq 200000000000:\\
\;\;\;\;\frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.99999999999999992e72Initial program 99.9%
Taylor expanded in z around 0 85.0%
Taylor expanded in x around 0 82.1%
if -4.99999999999999992e72 < (*.f64 a 120) < 2e11Initial program 99.7%
Taylor expanded in a around 0 74.3%
associate-*r/74.3%
Applied egg-rr74.3%
if 2e11 < (*.f64 a 120) Initial program 99.9%
Taylor expanded in z around inf 75.1%
Final simplification76.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- y) (- z t)))))
(if (<= y -2.7e+167)
t_1
(if (<= y -8.6e-67)
(* a 120.0)
(if (<= y -3.4e-93)
(* 60.0 (/ x (- z t)))
(if (<= y 3.8e+144) (* 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.7e+167) {
tmp = t_1;
} else if (y <= -8.6e-67) {
tmp = a * 120.0;
} else if (y <= -3.4e-93) {
tmp = 60.0 * (x / (z - t));
} else if (y <= 3.8e+144) {
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.7d+167)) then
tmp = t_1
else if (y <= (-8.6d-67)) then
tmp = a * 120.0d0
else if (y <= (-3.4d-93)) then
tmp = 60.0d0 * (x / (z - t))
else if (y <= 3.8d+144) 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.7e+167) {
tmp = t_1;
} else if (y <= -8.6e-67) {
tmp = a * 120.0;
} else if (y <= -3.4e-93) {
tmp = 60.0 * (x / (z - t));
} else if (y <= 3.8e+144) {
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.7e+167: tmp = t_1 elif y <= -8.6e-67: tmp = a * 120.0 elif y <= -3.4e-93: tmp = 60.0 * (x / (z - t)) elif y <= 3.8e+144: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(-y) / Float64(z - t))) tmp = 0.0 if (y <= -2.7e+167) tmp = t_1; elseif (y <= -8.6e-67) tmp = Float64(a * 120.0); elseif (y <= -3.4e-93) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (y <= 3.8e+144) 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.7e+167) tmp = t_1; elseif (y <= -8.6e-67) tmp = a * 120.0; elseif (y <= -3.4e-93) tmp = 60.0 * (x / (z - t)); elseif (y <= 3.8e+144) 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.7e+167], t$95$1, If[LessEqual[y, -8.6e-67], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, -3.4e-93], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e+144], 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.7 \cdot 10^{+167}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -8.6 \cdot 10^{-67}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-93}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+144}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.70000000000000005e167 or 3.80000000000000026e144 < y Initial program 99.8%
Taylor expanded in a around 0 78.6%
Taylor expanded in x around 0 70.6%
mul-1-neg70.6%
distribute-neg-frac70.6%
Simplified70.6%
if -2.70000000000000005e167 < y < -8.60000000000000053e-67 or -3.40000000000000001e-93 < y < 3.80000000000000026e144Initial program 99.8%
Taylor expanded in z around inf 60.2%
if -8.60000000000000053e-67 < y < -3.40000000000000001e-93Initial program 100.0%
Taylor expanded in a around 0 87.8%
Taylor expanded in x around inf 75.8%
Final simplification63.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.9e+169) (not (<= y 2.8e+157))) (/ (* (- x y) 60.0) (- z t)) (+ (* a 120.0) (* x (/ 60.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.9e+169) || !(y <= 2.8e+157)) {
tmp = ((x - y) * 60.0) / (z - t);
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-2.9d+169)) .or. (.not. (y <= 2.8d+157))) then
tmp = ((x - y) * 60.0d0) / (z - t)
else
tmp = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.9e+169) || !(y <= 2.8e+157)) {
tmp = ((x - y) * 60.0) / (z - t);
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.9e+169) or not (y <= 2.8e+157): tmp = ((x - y) * 60.0) / (z - t) else: tmp = (a * 120.0) + (x * (60.0 / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.9e+169) || !(y <= 2.8e+157)) tmp = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t)); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.9e+169) || ~((y <= 2.8e+157))) tmp = ((x - y) * 60.0) / (z - t); else tmp = (a * 120.0) + (x * (60.0 / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.9e+169], N[Not[LessEqual[y, 2.8e+157]], $MachinePrecision]], N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+169} \lor \neg \left(y \leq 2.8 \cdot 10^{+157}\right):\\
\;\;\;\;\frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if y < -2.9000000000000001e169 or 2.8000000000000003e157 < y Initial program 99.8%
Taylor expanded in a around 0 78.6%
associate-*r/78.6%
Applied egg-rr78.6%
if -2.9000000000000001e169 < y < 2.8000000000000003e157Initial program 99.8%
Taylor expanded in x around inf 88.4%
associate-*r/88.5%
*-commutative88.5%
associate-*r/88.4%
Simplified88.4%
Final simplification86.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.8e+167) (not (<= y 26.0))) (+ (* a 120.0) (/ (* y -60.0) (- z t))) (+ (* a 120.0) (* x (/ 60.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.8e+167) || !(y <= 26.0)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.8d+167)) .or. (.not. (y <= 26.0d0))) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + (x * (60.0d0 / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.8e+167) || !(y <= 26.0)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + (x * (60.0 / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.8e+167) or not (y <= 26.0): tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + (x * (60.0 / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.8e+167) || !(y <= 26.0)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.8e+167) || ~((y <= 26.0))) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + (x * (60.0 / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.8e+167], N[Not[LessEqual[y, 26.0]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+167} \lor \neg \left(y \leq 26\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z - t}\\
\end{array}
\end{array}
if y < -1.80000000000000012e167 or 26 < y Initial program 99.8%
Taylor expanded in x around 0 90.8%
if -1.80000000000000012e167 < y < 26Initial program 99.8%
Taylor expanded in x around inf 92.2%
associate-*r/92.3%
*-commutative92.3%
associate-*r/92.2%
Simplified92.2%
Final simplification91.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.8e+167) (not (<= y 26.0))) (+ (* a 120.0) (/ (* y -60.0) (- z t))) (+ (* a 120.0) (/ (* x 60.0) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.8e+167) || !(y <= 26.0)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + ((x * 60.0) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.8d+167)) .or. (.not. (y <= 26.0d0))) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
else
tmp = (a * 120.0d0) + ((x * 60.0d0) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.8e+167) || !(y <= 26.0)) {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
} else {
tmp = (a * 120.0) + ((x * 60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.8e+167) or not (y <= 26.0): tmp = (a * 120.0) + ((y * -60.0) / (z - t)) else: tmp = (a * 120.0) + ((x * 60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.8e+167) || !(y <= 26.0)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * 60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.8e+167) || ~((y <= 26.0))) tmp = (a * 120.0) + ((y * -60.0) / (z - t)); else tmp = (a * 120.0) + ((x * 60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.8e+167], N[Not[LessEqual[y, 26.0]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+167} \lor \neg \left(y \leq 26\right):\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot 60}{z - t}\\
\end{array}
\end{array}
if y < -1.80000000000000012e167 or 26 < y Initial program 99.8%
Taylor expanded in x around 0 90.8%
if -1.80000000000000012e167 < y < 26Initial program 99.8%
Taylor expanded in x around inf 92.3%
Final simplification91.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.6e+60) (* a 120.0) (if (<= a 900000000000.0) (* 60.0 (/ (- x y) (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e+60) {
tmp = a * 120.0;
} else if (a <= 900000000000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.6d+60)) then
tmp = a * 120.0d0
else if (a <= 900000000000.0d0) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e+60) {
tmp = a * 120.0;
} else if (a <= 900000000000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.6e+60: tmp = a * 120.0 elif a <= 900000000000.0: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.6e+60) tmp = Float64(a * 120.0); elseif (a <= 900000000000.0) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.6e+60) tmp = a * 120.0; elseif (a <= 900000000000.0) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.6e+60], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 900000000000.0], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{+60}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 900000000000:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.59999999999999995e60 or 9e11 < a Initial program 99.9%
Taylor expanded in z around inf 77.0%
if -1.59999999999999995e60 < a < 9e11Initial program 99.7%
Taylor expanded in a around 0 74.3%
Final simplification75.5%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (a * 120.0d0) + ((x - y) * (60.0d0 / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + ((x - y) * (60.0 / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + ((x - y) * (60.0 / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + ((x - y) * (60.0 / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + \left(x - y\right) \cdot \frac{60}{z - t}
\end{array}
Initial program 99.8%
associate-*l/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.7e+219) (not (<= x 1.7e+118))) (* 60.0 (/ x (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.7e+219) || !(x <= 1.7e+118)) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-1.7d+219)) .or. (.not. (x <= 1.7d+118))) then
tmp = 60.0d0 * (x / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.7e+219) || !(x <= 1.7e+118)) {
tmp = 60.0 * (x / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.7e+219) or not (x <= 1.7e+118): tmp = 60.0 * (x / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.7e+219) || !(x <= 1.7e+118)) tmp = Float64(60.0 * Float64(x / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -1.7e+219) || ~((x <= 1.7e+118))) tmp = 60.0 * (x / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.7e+219], N[Not[LessEqual[x, 1.7e+118]], $MachinePrecision]], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{+219} \lor \neg \left(x \leq 1.7 \cdot 10^{+118}\right):\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.70000000000000008e219 or 1.69999999999999993e118 < x Initial program 99.7%
Taylor expanded in a around 0 73.9%
Taylor expanded in x around inf 62.5%
if -1.70000000000000008e219 < x < 1.69999999999999993e118Initial program 99.8%
Taylor expanded in z around inf 57.7%
Final simplification58.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.5e-206) (* a 120.0) (if (<= a 3.15e-229) (* -60.0 (/ x t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.5e-206) {
tmp = a * 120.0;
} else if (a <= 3.15e-229) {
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 (a <= (-1.5d-206)) then
tmp = a * 120.0d0
else if (a <= 3.15d-229) 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 (a <= -1.5e-206) {
tmp = a * 120.0;
} else if (a <= 3.15e-229) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.5e-206: tmp = a * 120.0 elif a <= 3.15e-229: tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.5e-206) tmp = Float64(a * 120.0); elseif (a <= 3.15e-229) 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 (a <= -1.5e-206) tmp = a * 120.0; elseif (a <= 3.15e-229) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.5e-206], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 3.15e-229], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{-206}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 3.15 \cdot 10^{-229}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.5000000000000001e-206 or 3.14999999999999993e-229 < a Initial program 99.8%
Taylor expanded in z around inf 56.8%
if -1.5000000000000001e-206 < a < 3.14999999999999993e-229Initial program 99.6%
Taylor expanded in a around 0 91.3%
Taylor expanded in z around 0 55.7%
associate-*r/55.8%
*-commutative55.8%
associate-*r/55.7%
Simplified55.7%
Taylor expanded in x around inf 29.6%
Final simplification53.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.4e-217) (* a 120.0) (if (<= a 2.4e-140) (* 60.0 (/ y t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.4e-217) {
tmp = a * 120.0;
} else if (a <= 2.4e-140) {
tmp = 60.0 * (y / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.4d-217)) then
tmp = a * 120.0d0
else if (a <= 2.4d-140) then
tmp = 60.0d0 * (y / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.4e-217) {
tmp = a * 120.0;
} else if (a <= 2.4e-140) {
tmp = 60.0 * (y / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.4e-217: tmp = a * 120.0 elif a <= 2.4e-140: tmp = 60.0 * (y / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.4e-217) tmp = Float64(a * 120.0); elseif (a <= 2.4e-140) tmp = Float64(60.0 * Float64(y / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.4e-217) tmp = a * 120.0; elseif (a <= 2.4e-140) tmp = 60.0 * (y / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.4e-217], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 2.4e-140], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.4 \cdot 10^{-217}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{-140}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.3999999999999999e-217 or 2.39999999999999987e-140 < a Initial program 99.8%
Taylor expanded in z around inf 58.6%
if -2.3999999999999999e-217 < a < 2.39999999999999987e-140Initial program 99.6%
Taylor expanded in z around 0 65.9%
Taylor expanded in x around 0 43.5%
Taylor expanded in y around inf 34.1%
Final simplification53.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.1e-215) (* a 120.0) (if (<= a 8e-141) (* y (/ 60.0 t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.1e-215) {
tmp = a * 120.0;
} else if (a <= 8e-141) {
tmp = y * (60.0 / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.1d-215)) then
tmp = a * 120.0d0
else if (a <= 8d-141) then
tmp = y * (60.0d0 / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.1e-215) {
tmp = a * 120.0;
} else if (a <= 8e-141) {
tmp = y * (60.0 / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.1e-215: tmp = a * 120.0 elif a <= 8e-141: tmp = y * (60.0 / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.1e-215) tmp = Float64(a * 120.0); elseif (a <= 8e-141) tmp = Float64(y * Float64(60.0 / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.1e-215) tmp = a * 120.0; elseif (a <= 8e-141) tmp = y * (60.0 / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.1e-215], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 8e-141], N[(y * N[(60.0 / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{-215}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 8 \cdot 10^{-141}:\\
\;\;\;\;y \cdot \frac{60}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.09999999999999998e-215 or 8.0000000000000003e-141 < a Initial program 99.8%
Taylor expanded in z around inf 58.6%
if -1.09999999999999998e-215 < a < 8.0000000000000003e-141Initial program 99.6%
Taylor expanded in z around 0 65.9%
Taylor expanded in x around 0 43.5%
Taylor expanded in y around inf 34.1%
clear-num34.1%
un-div-inv34.1%
Applied egg-rr34.1%
associate-/r/34.2%
Simplified34.2%
Final simplification53.7%
(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.8%
Taylor expanded in z around inf 50.3%
Final simplification50.3%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2023297
(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)))