
(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 15 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 (- (* a 120.0) (* (- x y) (/ 60.0 (- t z)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) - ((x - y) * (60.0 / (t - z)));
}
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 / (t - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) - ((x - y) * (60.0 / (t - z)));
}
def code(x, y, z, t, a): return (a * 120.0) - ((x - y) * (60.0 / (t - z)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) - Float64(Float64(x - y) * Float64(60.0 / Float64(t - z)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) - ((x - y) * (60.0 / (t - z))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] - N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 - \left(x - y\right) \cdot \frac{60}{t - z}
\end{array}
Initial program 99.5%
*-commutative99.5%
associate-/l*99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- x y) 60.0) (- z t))))
(if (<= t_1 -500000000.0)
(* 60.0 (/ (- x y) (- z t)))
(if (<= t_1 1e-108)
(* a 120.0)
(if (<= t_1 1e+19)
(+ (* a 120.0) (/ (* y -60.0) z))
(/ 60.0 (/ (- z t) (- x y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_1 <= -500000000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (t_1 <= 1e-108) {
tmp = a * 120.0;
} else if (t_1 <= 1e+19) {
tmp = (a * 120.0) + ((y * -60.0) / z);
} 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) :: t_1
real(8) :: tmp
t_1 = ((x - y) * 60.0d0) / (z - t)
if (t_1 <= (-500000000.0d0)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (t_1 <= 1d-108) then
tmp = a * 120.0d0
else if (t_1 <= 1d+19) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / z)
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 t_1 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_1 <= -500000000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (t_1 <= 1e-108) {
tmp = a * 120.0;
} else if (t_1 <= 1e+19) {
tmp = (a * 120.0) + ((y * -60.0) / z);
} else {
tmp = 60.0 / ((z - t) / (x - y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((x - y) * 60.0) / (z - t) tmp = 0 if t_1 <= -500000000.0: tmp = 60.0 * ((x - y) / (z - t)) elif t_1 <= 1e-108: tmp = a * 120.0 elif t_1 <= 1e+19: tmp = (a * 120.0) + ((y * -60.0) / z) else: tmp = 60.0 / ((z - t) / (x - y)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t)) tmp = 0.0 if (t_1 <= -500000000.0) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (t_1 <= 1e-108) tmp = Float64(a * 120.0); elseif (t_1 <= 1e+19) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / z)); else tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((x - y) * 60.0) / (z - t); tmp = 0.0; if (t_1 <= -500000000.0) tmp = 60.0 * ((x - y) / (z - t)); elseif (t_1 <= 1e-108) tmp = a * 120.0; elseif (t_1 <= 1e+19) tmp = (a * 120.0) + ((y * -60.0) / z); else tmp = 60.0 / ((z - t) / (x - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -500000000.0], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e-108], N[(a * 120.0), $MachinePrecision], If[LessEqual[t$95$1, 1e+19], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{if}\;t\_1 \leq -500000000:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;t\_1 \leq 10^{-108}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t\_1 \leq 10^{+19}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5e8Initial program 98.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 85.7%
if -5e8 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.00000000000000004e-108Initial program 99.9%
*-commutative99.9%
associate-/l*100.0%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 86.9%
if 1.00000000000000004e-108 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1e19Initial program 99.9%
*-commutative99.9%
associate-/l*99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 89.5%
associate-*r/89.6%
Simplified89.6%
Taylor expanded in z around inf 86.6%
if 1e19 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 84.0%
clear-num83.9%
un-div-inv84.1%
Applied egg-rr84.1%
Final simplification86.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- x y) 60.0) (- z t))))
(if (<= t_1 -500000000.0)
(* 60.0 (/ (- x y) (- z t)))
(if (<= t_1 1e+19)
(- (* a 120.0) (* y (/ -60.0 (- t z))))
(/ 60.0 (/ (- z t) (- x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_1 <= -500000000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (t_1 <= 1e+19) {
tmp = (a * 120.0) - (y * (-60.0 / (t - z)));
} 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) :: t_1
real(8) :: tmp
t_1 = ((x - y) * 60.0d0) / (z - t)
if (t_1 <= (-500000000.0d0)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (t_1 <= 1d+19) then
tmp = (a * 120.0d0) - (y * ((-60.0d0) / (t - z)))
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 t_1 = ((x - y) * 60.0) / (z - t);
double tmp;
if (t_1 <= -500000000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (t_1 <= 1e+19) {
tmp = (a * 120.0) - (y * (-60.0 / (t - z)));
} else {
tmp = 60.0 / ((z - t) / (x - y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((x - y) * 60.0) / (z - t) tmp = 0 if t_1 <= -500000000.0: tmp = 60.0 * ((x - y) / (z - t)) elif t_1 <= 1e+19: tmp = (a * 120.0) - (y * (-60.0 / (t - z))) else: tmp = 60.0 / ((z - t) / (x - y)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t)) tmp = 0.0 if (t_1 <= -500000000.0) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (t_1 <= 1e+19) tmp = Float64(Float64(a * 120.0) - Float64(y * Float64(-60.0 / Float64(t - z)))); else tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((x - y) * 60.0) / (z - t); tmp = 0.0; if (t_1 <= -500000000.0) tmp = 60.0 * ((x - y) / (z - t)); elseif (t_1 <= 1e+19) tmp = (a * 120.0) - (y * (-60.0 / (t - z))); else tmp = 60.0 / ((z - t) / (x - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -500000000.0], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+19], N[(N[(a * 120.0), $MachinePrecision] - N[(y * N[(-60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{if}\;t\_1 \leq -500000000:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;t\_1 \leq 10^{+19}:\\
\;\;\;\;a \cdot 120 - y \cdot \frac{-60}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5e8Initial program 98.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 85.7%
if -5e8 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1e19Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 92.4%
associate-*r/92.4%
*-commutative92.4%
*-lft-identity92.4%
times-frac92.4%
/-rgt-identity92.4%
Simplified92.4%
if 1e19 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 84.0%
clear-num83.9%
un-div-inv84.1%
Applied egg-rr84.1%
Final simplification89.1%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -1e+201)
(+ (* a 120.0) (/ (* y -60.0) z))
(if (<= (* a 120.0) -2e-17)
(+ (* a 120.0) (/ (* x 60.0) z))
(if (<= (* a 120.0) 10000.0)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (* -60.0 (/ x t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e+201) {
tmp = (a * 120.0) + ((y * -60.0) / z);
} else if ((a * 120.0) <= -2e-17) {
tmp = (a * 120.0) + ((x * 60.0) / z);
} else if ((a * 120.0) <= 10000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (-60.0 * (x / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-1d+201)) then
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / z)
else if ((a * 120.0d0) <= (-2d-17)) then
tmp = (a * 120.0d0) + ((x * 60.0d0) / z)
else if ((a * 120.0d0) <= 10000.0d0) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -1e+201) {
tmp = (a * 120.0) + ((y * -60.0) / z);
} else if ((a * 120.0) <= -2e-17) {
tmp = (a * 120.0) + ((x * 60.0) / z);
} else if ((a * 120.0) <= 10000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (-60.0 * (x / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -1e+201: tmp = (a * 120.0) + ((y * -60.0) / z) elif (a * 120.0) <= -2e-17: tmp = (a * 120.0) + ((x * 60.0) / z) elif (a * 120.0) <= 10000.0: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (-60.0 * (x / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -1e+201) tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / z)); elseif (Float64(a * 120.0) <= -2e-17) tmp = Float64(Float64(a * 120.0) + Float64(Float64(x * 60.0) / z)); elseif (Float64(a * 120.0) <= 10000.0) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -1e+201) tmp = (a * 120.0) + ((y * -60.0) / z); elseif ((a * 120.0) <= -2e-17) tmp = (a * 120.0) + ((x * 60.0) / z); elseif ((a * 120.0) <= 10000.0) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (-60.0 * (x / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -1e+201], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-17], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(x * 60.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 10000.0], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -1 \cdot 10^{+201}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z}\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-17}:\\
\;\;\;\;a \cdot 120 + \frac{x \cdot 60}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 10000:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -1.00000000000000004e201Initial program 100.0%
*-commutative100.0%
associate-/l*100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 100.0%
associate-*r/100.0%
Simplified100.0%
Taylor expanded in z around inf 95.8%
if -1.00000000000000004e201 < (*.f64 a #s(literal 120 binary64)) < -2.00000000000000014e-17Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 92.0%
associate-*r/92.0%
Simplified92.0%
Taylor expanded in z around inf 79.7%
if -2.00000000000000014e-17 < (*.f64 a #s(literal 120 binary64)) < 1e4Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 76.2%
if 1e4 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 91.2%
associate-*r/91.1%
Simplified91.1%
Taylor expanded in z around 0 79.8%
Final simplification79.5%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -2e-17)
(* a 120.0)
(if (<= (* a 120.0) 10000.0)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (* -60.0 (/ x t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-17) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 10000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (-60.0 * (x / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-2d-17)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 10000.0d0) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -2e-17) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 10000.0) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (-60.0 * (x / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -2e-17: tmp = a * 120.0 elif (a * 120.0) <= 10000.0: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (-60.0 * (x / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -2e-17) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 10000.0) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -2e-17) tmp = a * 120.0; elseif ((a * 120.0) <= 10000.0) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (-60.0 * (x / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-17], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 10000.0], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-17}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 10000:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if (*.f64 a #s(literal 120 binary64)) < -2.00000000000000014e-17Initial program 99.9%
*-commutative99.9%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 77.8%
if -2.00000000000000014e-17 < (*.f64 a #s(literal 120 binary64)) < 1e4Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 76.2%
if 1e4 < (*.f64 a #s(literal 120 binary64)) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 91.2%
associate-*r/91.1%
Simplified91.1%
Taylor expanded in z around 0 79.8%
Final simplification77.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -9.2e+50) (not (<= y 1.35e+134))) (- (* a 120.0) (* y (/ -60.0 (- t z)))) (- (* a 120.0) (/ (* x 60.0) (- t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9.2e+50) || !(y <= 1.35e+134)) {
tmp = (a * 120.0) - (y * (-60.0 / (t - z)));
} else {
tmp = (a * 120.0) - ((x * 60.0) / (t - 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 <= (-9.2d+50)) .or. (.not. (y <= 1.35d+134))) then
tmp = (a * 120.0d0) - (y * ((-60.0d0) / (t - z)))
else
tmp = (a * 120.0d0) - ((x * 60.0d0) / (t - 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 <= -9.2e+50) || !(y <= 1.35e+134)) {
tmp = (a * 120.0) - (y * (-60.0 / (t - z)));
} else {
tmp = (a * 120.0) - ((x * 60.0) / (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -9.2e+50) or not (y <= 1.35e+134): tmp = (a * 120.0) - (y * (-60.0 / (t - z))) else: tmp = (a * 120.0) - ((x * 60.0) / (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -9.2e+50) || !(y <= 1.35e+134)) tmp = Float64(Float64(a * 120.0) - Float64(y * Float64(-60.0 / Float64(t - z)))); else tmp = Float64(Float64(a * 120.0) - Float64(Float64(x * 60.0) / Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -9.2e+50) || ~((y <= 1.35e+134))) tmp = (a * 120.0) - (y * (-60.0 / (t - z))); else tmp = (a * 120.0) - ((x * 60.0) / (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -9.2e+50], N[Not[LessEqual[y, 1.35e+134]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] - N[(y * N[(-60.0 / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] - N[(N[(x * 60.0), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{+50} \lor \neg \left(y \leq 1.35 \cdot 10^{+134}\right):\\
\;\;\;\;a \cdot 120 - y \cdot \frac{-60}{t - z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 - \frac{x \cdot 60}{t - z}\\
\end{array}
\end{array}
if y < -9.19999999999999987e50 or 1.35e134 < y Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 89.7%
associate-*r/89.8%
*-commutative89.8%
*-lft-identity89.8%
times-frac89.8%
/-rgt-identity89.8%
Simplified89.8%
if -9.19999999999999987e50 < y < 1.35e134Initial program 99.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 93.4%
associate-*r/92.9%
Simplified92.9%
Final simplification92.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.7e-19) (not (<= a 640.0))) (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.7e-19) || !(a <= 640.0)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.7d-19)) .or. (.not. (a <= 640.0d0))) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * ((x - y) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.7e-19) || !(a <= 640.0)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.7e-19) or not (a <= 640.0): tmp = a * 120.0 else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.7e-19) || !(a <= 640.0)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.7e-19) || ~((a <= 640.0))) tmp = a * 120.0; else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.7e-19], N[Not[LessEqual[a, 640.0]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.7 \cdot 10^{-19} \lor \neg \left(a \leq 640\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if a < -2.7000000000000001e-19 or 640 < a Initial program 99.9%
*-commutative99.9%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 77.4%
if -2.7000000000000001e-19 < a < 640Initial program 99.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 76.2%
Final simplification76.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.12e+134) (not (<= y 4.8e+158))) (* -60.0 (/ y (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.12e+134) || !(y <= 4.8e+158)) {
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 <= (-1.12d+134)) .or. (.not. (y <= 4.8d+158))) 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 <= -1.12e+134) || !(y <= 4.8e+158)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.12e+134) or not (y <= 4.8e+158): 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 <= -1.12e+134) || !(y <= 4.8e+158)) 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 <= -1.12e+134) || ~((y <= 4.8e+158))) 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, -1.12e+134], N[Not[LessEqual[y, 4.8e+158]], $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 -1.12 \cdot 10^{+134} \lor \neg \left(y \leq 4.8 \cdot 10^{+158}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -1.12000000000000007e134 or 4.80000000000000016e158 < y Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 83.6%
clear-num83.5%
un-div-inv83.6%
Applied egg-rr83.6%
Taylor expanded in x around 0 72.8%
if -1.12000000000000007e134 < y < 4.80000000000000016e158Initial program 99.4%
*-commutative99.4%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 64.9%
Final simplification66.8%
(FPCore (x y z t a) :precision binary64 (if (<= y -3.9e+133) (/ 60.0 (/ (- t z) y)) (if (<= y 2.7e+159) (* a 120.0) (* -60.0 (/ y (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -3.9e+133) {
tmp = 60.0 / ((t - z) / y);
} else if (y <= 2.7e+159) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-3.9d+133)) then
tmp = 60.0d0 / ((t - z) / y)
else if (y <= 2.7d+159) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -3.9e+133) {
tmp = 60.0 / ((t - z) / y);
} else if (y <= 2.7e+159) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -3.9e+133: tmp = 60.0 / ((t - z) / y) elif y <= 2.7e+159: tmp = a * 120.0 else: tmp = -60.0 * (y / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -3.9e+133) tmp = Float64(60.0 / Float64(Float64(t - z) / y)); elseif (y <= 2.7e+159) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -3.9e+133) tmp = 60.0 / ((t - z) / y); elseif (y <= 2.7e+159) tmp = a * 120.0; else tmp = -60.0 * (y / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -3.9e+133], N[(60.0 / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e+159], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{+133}:\\
\;\;\;\;\frac{60}{\frac{t - z}{y}}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+159}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if y < -3.90000000000000014e133Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.0%
clear-num80.9%
un-div-inv81.1%
Applied egg-rr81.1%
Taylor expanded in x around 0 70.9%
mul-1-neg70.9%
distribute-neg-frac270.9%
Simplified70.9%
if -3.90000000000000014e133 < y < 2.70000000000000008e159Initial program 99.4%
*-commutative99.4%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 64.9%
if 2.70000000000000008e159 < y Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 88.0%
clear-num87.7%
un-div-inv87.7%
Applied egg-rr87.7%
Taylor expanded in x around 0 76.1%
Final simplification66.8%
(FPCore (x y z t a) :precision binary64 (if (<= y -6.2e+129) (* y (/ -60.0 (- z t))) (if (<= y 3.8e+159) (* a 120.0) (* -60.0 (/ y (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -6.2e+129) {
tmp = y * (-60.0 / (z - t));
} else if (y <= 3.8e+159) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-6.2d+129)) then
tmp = y * ((-60.0d0) / (z - t))
else if (y <= 3.8d+159) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -6.2e+129) {
tmp = y * (-60.0 / (z - t));
} else if (y <= 3.8e+159) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -6.2e+129: tmp = y * (-60.0 / (z - t)) elif y <= 3.8e+159: tmp = a * 120.0 else: tmp = -60.0 * (y / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -6.2e+129) tmp = Float64(y * Float64(-60.0 / Float64(z - t))); elseif (y <= 3.8e+159) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -6.2e+129) tmp = y * (-60.0 / (z - t)); elseif (y <= 3.8e+159) tmp = a * 120.0; else tmp = -60.0 * (y / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -6.2e+129], N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e+159], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+129}:\\
\;\;\;\;y \cdot \frac{-60}{z - t}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+159}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if y < -6.1999999999999999e129Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.0%
Taylor expanded in x around 0 70.8%
associate-*r/89.7%
*-commutative89.7%
*-lft-identity89.7%
times-frac89.7%
/-rgt-identity89.7%
Simplified70.9%
if -6.1999999999999999e129 < y < 3.79999999999999965e159Initial program 99.4%
*-commutative99.4%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 64.9%
if 3.79999999999999965e159 < y Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 88.0%
clear-num87.7%
un-div-inv87.7%
Applied egg-rr87.7%
Taylor expanded in x around 0 76.1%
Final simplification66.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -4.7e+150) (not (<= x 1.28e+122))) (/ -60.0 (/ t x)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -4.7e+150) || !(x <= 1.28e+122)) {
tmp = -60.0 / (t / x);
} 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 <= (-4.7d+150)) .or. (.not. (x <= 1.28d+122))) then
tmp = (-60.0d0) / (t / x)
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 <= -4.7e+150) || !(x <= 1.28e+122)) {
tmp = -60.0 / (t / x);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -4.7e+150) or not (x <= 1.28e+122): tmp = -60.0 / (t / x) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -4.7e+150) || !(x <= 1.28e+122)) tmp = Float64(-60.0 / Float64(t / x)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -4.7e+150) || ~((x <= 1.28e+122))) tmp = -60.0 / (t / x); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -4.7e+150], N[Not[LessEqual[x, 1.28e+122]], $MachinePrecision]], N[(-60.0 / N[(t / x), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.7 \cdot 10^{+150} \lor \neg \left(x \leq 1.28 \cdot 10^{+122}\right):\\
\;\;\;\;\frac{-60}{\frac{t}{x}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -4.70000000000000004e150 or 1.28e122 < x Initial program 98.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 79.4%
Taylor expanded in z around 0 53.4%
clear-num53.4%
un-div-inv53.5%
Applied egg-rr53.5%
Taylor expanded in x around inf 48.5%
if -4.70000000000000004e150 < x < 1.28e122Initial program 99.8%
*-commutative99.8%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 63.5%
Final simplification59.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.5e+150) (not (<= x 1.3e+122))) (* -60.0 (/ x t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.5e+150) || !(x <= 1.3e+122)) {
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.5d+150)) .or. (.not. (x <= 1.3d+122))) 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.5e+150) || !(x <= 1.3e+122)) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.5e+150) or not (x <= 1.3e+122): 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.5e+150) || !(x <= 1.3e+122)) 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.5e+150) || ~((x <= 1.3e+122))) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.5e+150], N[Not[LessEqual[x, 1.3e+122]], $MachinePrecision]], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{+150} \lor \neg \left(x \leq 1.3 \cdot 10^{+122}\right):\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.50000000000000006e150 or 1.30000000000000004e122 < x Initial program 98.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 79.4%
Taylor expanded in z around 0 53.4%
Taylor expanded in x around inf 48.4%
if -1.50000000000000006e150 < x < 1.30000000000000004e122Initial program 99.8%
*-commutative99.8%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 63.5%
Final simplification59.7%
(FPCore (x y z t a) :precision binary64 (if (<= x -5.6e+150) (* -60.0 (/ x t)) (if (<= x 1.3e+122) (* a 120.0) (* x (/ -60.0 t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5.6e+150) {
tmp = -60.0 * (x / t);
} else if (x <= 1.3e+122) {
tmp = a * 120.0;
} else {
tmp = x * (-60.0 / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-5.6d+150)) then
tmp = (-60.0d0) * (x / t)
else if (x <= 1.3d+122) then
tmp = a * 120.0d0
else
tmp = x * ((-60.0d0) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5.6e+150) {
tmp = -60.0 * (x / t);
} else if (x <= 1.3e+122) {
tmp = a * 120.0;
} else {
tmp = x * (-60.0 / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -5.6e+150: tmp = -60.0 * (x / t) elif x <= 1.3e+122: tmp = a * 120.0 else: tmp = x * (-60.0 / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -5.6e+150) tmp = Float64(-60.0 * Float64(x / t)); elseif (x <= 1.3e+122) tmp = Float64(a * 120.0); else tmp = Float64(x * Float64(-60.0 / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -5.6e+150) tmp = -60.0 * (x / t); elseif (x <= 1.3e+122) tmp = a * 120.0; else tmp = x * (-60.0 / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -5.6e+150], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.3e+122], N[(a * 120.0), $MachinePrecision], N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.6 \cdot 10^{+150}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{+122}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-60}{t}\\
\end{array}
\end{array}
if x < -5.60000000000000018e150Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 78.1%
Taylor expanded in z around 0 49.4%
Taylor expanded in x around inf 48.5%
if -5.60000000000000018e150 < x < 1.30000000000000004e122Initial program 99.8%
*-commutative99.8%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 63.5%
if 1.30000000000000004e122 < x Initial program 96.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 81.3%
associate-*r/77.8%
Simplified77.8%
Taylor expanded in z around 0 63.0%
Taylor expanded in x around inf 48.3%
associate-*r/48.3%
associate-*l/48.3%
*-commutative48.3%
Simplified48.3%
Final simplification59.7%
(FPCore (x y z t a) :precision binary64 (+ (* a 120.0) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (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) + (60.0d0 * ((x - y) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (a * 120.0) + (60.0 * ((x - y) / (z - t)));
}
def code(x, y, z, t, a): return (a * 120.0) + (60.0 * ((x - y) / (z - t)))
function code(x, y, z, t, a) return Float64(Float64(a * 120.0) + Float64(60.0 * Float64(Float64(x - y) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = (a * 120.0) + (60.0 * ((x - y) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120 + 60 \cdot \frac{x - y}{z - t}
\end{array}
Initial program 99.5%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(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.5%
*-commutative99.5%
associate-/l*99.9%
fma-define99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
distribute-frac-neg299.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 53.3%
Final simplification53.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 2024182
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:alt
(! :herbie-platform default (+ (/ 60 (/ (- z t) (- x y))) (* a 120)))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))