
(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 (fma 60.0 (/ (- x y) (- z t)) (* 120.0 a)))
double code(double x, double y, double z, double t, double a) {
return fma(60.0, ((x - y) / (z - t)), (120.0 * a));
}
function code(x, y, z, t, a) return fma(60.0, Float64(Float64(x - y) / Float64(z - t)), Float64(120.0 * a)) end
code[x_, y_, z_, t_, a_] := N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(60, \frac{x - y}{z - t}, 120 \cdot a\right)
\end{array}
Initial program 99.8%
Taylor expanded in x around 0
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
times-fracN/A
metadata-evalN/A
associate-*r*N/A
times-fracN/A
metadata-evalN/A
neg-mul-1N/A
distribute-neg-fracN/A
distribute-lft-inN/A
sub-negN/A
div-subN/A
lower-fma.f64N/A
Simplified99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -2e+51)
t_1
(if (<= t_1 -5e-136)
(fma 60.0 (/ (- x) t) (* 120.0 a))
(if (<= t_1 2e+57) (* 120.0 a) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -2e+51) {
tmp = t_1;
} else if (t_1 <= -5e-136) {
tmp = fma(60.0, (-x / t), (120.0 * a));
} else if (t_1 <= 2e+57) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -2e+51) tmp = t_1; elseif (t_1 <= -5e-136) tmp = fma(60.0, Float64(Float64(-x) / t), Float64(120.0 * a)); elseif (t_1 <= 2e+57) tmp = Float64(120.0 * a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+51], t$95$1, If[LessEqual[t$95$1, -5e-136], N[(60.0 * N[((-x) / t), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+57], N[(120.0 * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-136}:\\
\;\;\;\;\mathsf{fma}\left(60, \frac{-x}{t}, 120 \cdot a\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+57}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2e51 or 2.0000000000000001e57 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6485.7
Simplified85.7%
if -2e51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000002e-136Initial program 99.8%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6482.0
Simplified82.0%
Taylor expanded in z around 0
mul-1-negN/A
lower-neg.f6475.5
Simplified75.5%
if -5.0000000000000002e-136 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2.0000000000000001e57Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6480.9
Simplified80.9%
Final simplification81.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -2e+51)
t_1
(if (<= t_1 -5e-136)
(fma 120.0 a (/ (* x -60.0) t))
(if (<= t_1 2e+57) (* 120.0 a) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -2e+51) {
tmp = t_1;
} else if (t_1 <= -5e-136) {
tmp = fma(120.0, a, ((x * -60.0) / t));
} else if (t_1 <= 2e+57) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -2e+51) tmp = t_1; elseif (t_1 <= -5e-136) tmp = fma(120.0, a, Float64(Float64(x * -60.0) / t)); elseif (t_1 <= 2e+57) tmp = Float64(120.0 * a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+51], t$95$1, If[LessEqual[t$95$1, -5e-136], N[(120.0 * a + N[(N[(x * -60.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+57], N[(120.0 * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-136}:\\
\;\;\;\;\mathsf{fma}\left(120, a, \frac{x \cdot -60}{t}\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+57}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2e51 or 2.0000000000000001e57 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6485.7
Simplified85.7%
if -2e51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.0000000000000002e-136Initial program 99.8%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6482.0
Simplified82.0%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f64N/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f6475.5
Simplified75.5%
if -5.0000000000000002e-136 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2.0000000000000001e57Initial program 99.9%
Taylor expanded in z around inf
lower-*.f6480.9
Simplified80.9%
Final simplification81.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ (- x y) t))) (t_2 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_2 -2e+241)
t_1
(if (<= t_2 -2e+51)
(* y (/ -60.0 (- z t)))
(if (<= t_2 1e+159) (* 120.0 a) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * ((x - y) / t);
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -2e+241) {
tmp = t_1;
} else if (t_2 <= -2e+51) {
tmp = y * (-60.0 / (z - t));
} else if (t_2 <= 1e+159) {
tmp = 120.0 * a;
} 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) :: t_2
real(8) :: tmp
t_1 = (-60.0d0) * ((x - y) / t)
t_2 = (60.0d0 * (x - y)) / (z - t)
if (t_2 <= (-2d+241)) then
tmp = t_1
else if (t_2 <= (-2d+51)) then
tmp = y * ((-60.0d0) / (z - t))
else if (t_2 <= 1d+159) then
tmp = 120.0d0 * a
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 * ((x - y) / t);
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -2e+241) {
tmp = t_1;
} else if (t_2 <= -2e+51) {
tmp = y * (-60.0 / (z - t));
} else if (t_2 <= 1e+159) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * ((x - y) / t) t_2 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_2 <= -2e+241: tmp = t_1 elif t_2 <= -2e+51: tmp = y * (-60.0 / (z - t)) elif t_2 <= 1e+159: tmp = 120.0 * a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(Float64(x - y) / t)) t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_2 <= -2e+241) tmp = t_1; elseif (t_2 <= -2e+51) tmp = Float64(y * Float64(-60.0 / Float64(z - t))); elseif (t_2 <= 1e+159) tmp = Float64(120.0 * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * ((x - y) / t); t_2 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_2 <= -2e+241) tmp = t_1; elseif (t_2 <= -2e+51) tmp = y * (-60.0 / (z - t)); elseif (t_2 <= 1e+159) tmp = 120.0 * a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+241], t$95$1, If[LessEqual[t$95$2, -2e+51], N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+159], N[(120.0 * a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x - y}{t}\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+241}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{+51}:\\
\;\;\;\;y \cdot \frac{-60}{z - t}\\
\mathbf{elif}\;t\_2 \leq 10^{+159}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.0000000000000001e241 or 9.9999999999999993e158 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.8%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6494.4
Simplified94.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f6466.4
Simplified66.4%
if -2.0000000000000001e241 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2e51Initial program 99.5%
Taylor expanded in x around 0
associate-+r+N/A
+-commutativeN/A
metadata-evalN/A
times-fracN/A
metadata-evalN/A
associate-*r*N/A
times-fracN/A
metadata-evalN/A
neg-mul-1N/A
distribute-neg-fracN/A
distribute-lft-inN/A
sub-negN/A
div-subN/A
lower-fma.f64N/A
Simplified99.6%
Taylor expanded in a around 0
+-commutativeN/A
lower-fma.f64N/A
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6499.5
Simplified99.5%
Taylor expanded in a around inf
lower-*.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6489.8
Simplified89.8%
Taylor expanded in y around inf
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
associate-*r/N/A
lower-*.f64N/A
associate-*r/N/A
metadata-evalN/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f64N/A
lower--.f6452.7
Simplified52.7%
if -2e51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999993e158Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6471.5
Simplified71.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -2e+62)
t_1
(if (<= t_1 5e+118) (fma -60.0 (/ y (- z t)) (* 120.0 a)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -2e+62) {
tmp = t_1;
} else if (t_1 <= 5e+118) {
tmp = fma(-60.0, (y / (z - t)), (120.0 * a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -2e+62) tmp = t_1; elseif (t_1 <= 5e+118) tmp = fma(-60.0, Float64(y / Float64(z - t)), Float64(120.0 * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+62], t$95$1, If[LessEqual[t$95$1, 5e+118], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+118}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{y}{z - t}, 120 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2.00000000000000007e62 or 4.99999999999999972e118 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6490.1
Simplified90.1%
if -2.00000000000000007e62 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999972e118Initial program 99.8%
Taylor expanded in x around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6485.4
Simplified85.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (* 60.0 (- x y)) (- z t)))) (if (<= t_1 -2e+51) t_1 (if (<= t_1 2e+57) (* 120.0 a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -2e+51) {
tmp = t_1;
} else if (t_1 <= 2e+57) {
tmp = 120.0 * a;
} 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 * (x - y)) / (z - t)
if (t_1 <= (-2d+51)) then
tmp = t_1
else if (t_1 <= 2d+57) then
tmp = 120.0d0 * a
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 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -2e+51) {
tmp = t_1;
} else if (t_1 <= 2e+57) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -2e+51: tmp = t_1 elif t_1 <= 2e+57: tmp = 120.0 * a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -2e+51) tmp = t_1; elseif (t_1 <= 2e+57) tmp = Float64(120.0 * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -2e+51) tmp = t_1; elseif (t_1 <= 2e+57) tmp = 120.0 * a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+51], t$95$1, If[LessEqual[t$95$1, 2e+57], N[(120.0 * a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+57}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2e51 or 2.0000000000000001e57 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6485.7
Simplified85.7%
if -2e51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2.0000000000000001e57Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6475.4
Simplified75.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -4e+64)
(* 60.0 (/ (- x y) z))
(if (<= t_1 1e+159) (* 120.0 a) (* -60.0 (/ (- x y) t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -4e+64) {
tmp = 60.0 * ((x - y) / z);
} else if (t_1 <= 1e+159) {
tmp = 120.0 * a;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-4d+64)) then
tmp = 60.0d0 * ((x - y) / z)
else if (t_1 <= 1d+159) then
tmp = 120.0d0 * a
else
tmp = (-60.0d0) * ((x - y) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -4e+64) {
tmp = 60.0 * ((x - y) / z);
} else if (t_1 <= 1e+159) {
tmp = 120.0 * a;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -4e+64: tmp = 60.0 * ((x - y) / z) elif t_1 <= 1e+159: tmp = 120.0 * a else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -4e+64) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (t_1 <= 1e+159) tmp = Float64(120.0 * a); else tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -4e+64) tmp = 60.0 * ((x - y) / z); elseif (t_1 <= 1e+159) tmp = 120.0 * a; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+64], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+159], N[(120.0 * a), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+64}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;t\_1 \leq 10^{+159}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4.00000000000000009e64Initial program 99.6%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6491.6
Simplified91.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower--.f6450.0
Simplified50.0%
if -4.00000000000000009e64 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999993e158Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6470.1
Simplified70.1%
if 9.9999999999999993e158 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6492.4
Simplified92.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f6464.9
Simplified64.9%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* -60.0 (/ (- x y) t))) (t_2 (/ (* 60.0 (- x y)) (- z t)))) (if (<= t_2 -2e+51) t_1 (if (<= t_2 1e+159) (* 120.0 a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * ((x - y) / t);
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -2e+51) {
tmp = t_1;
} else if (t_2 <= 1e+159) {
tmp = 120.0 * a;
} 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) :: t_2
real(8) :: tmp
t_1 = (-60.0d0) * ((x - y) / t)
t_2 = (60.0d0 * (x - y)) / (z - t)
if (t_2 <= (-2d+51)) then
tmp = t_1
else if (t_2 <= 1d+159) then
tmp = 120.0d0 * a
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 * ((x - y) / t);
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -2e+51) {
tmp = t_1;
} else if (t_2 <= 1e+159) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * ((x - y) / t) t_2 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_2 <= -2e+51: tmp = t_1 elif t_2 <= 1e+159: tmp = 120.0 * a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(Float64(x - y) / t)) t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_2 <= -2e+51) tmp = t_1; elseif (t_2 <= 1e+159) tmp = Float64(120.0 * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * ((x - y) / t); t_2 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_2 <= -2e+51) tmp = t_1; elseif (t_2 <= 1e+159) tmp = 120.0 * a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+51], t$95$1, If[LessEqual[t$95$2, 1e+159], N[(120.0 * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x - y}{t}\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+159}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -2e51 or 9.9999999999999993e158 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6491.2
Simplified91.2%
Taylor expanded in z around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f6454.6
Simplified54.6%
if -2e51 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999993e158Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6471.5
Simplified71.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -4e+65)
(/ (* 60.0 x) z)
(if (<= t_1 1e+193) (* 120.0 a) (/ (* 60.0 y) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -4e+65) {
tmp = (60.0 * x) / z;
} else if (t_1 <= 1e+193) {
tmp = 120.0 * a;
} else {
tmp = (60.0 * y) / t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-4d+65)) then
tmp = (60.0d0 * x) / z
else if (t_1 <= 1d+193) then
tmp = 120.0d0 * a
else
tmp = (60.0d0 * y) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -4e+65) {
tmp = (60.0 * x) / z;
} else if (t_1 <= 1e+193) {
tmp = 120.0 * a;
} else {
tmp = (60.0 * y) / t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -4e+65: tmp = (60.0 * x) / z elif t_1 <= 1e+193: tmp = 120.0 * a else: tmp = (60.0 * y) / t return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -4e+65) tmp = Float64(Float64(60.0 * x) / z); elseif (t_1 <= 1e+193) tmp = Float64(120.0 * a); else tmp = Float64(Float64(60.0 * y) / t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -4e+65) tmp = (60.0 * x) / z; elseif (t_1 <= 1e+193) tmp = 120.0 * a; else tmp = (60.0 * y) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+65], N[(N[(60.0 * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 1e+193], N[(120.0 * a), $MachinePrecision], N[(N[(60.0 * y), $MachinePrecision] / t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+65}:\\
\;\;\;\;\frac{60 \cdot x}{z}\\
\mathbf{elif}\;t\_1 \leq 10^{+193}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;\frac{60 \cdot y}{t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4e65Initial program 99.6%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6491.3
Simplified91.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower--.f6448.6
Simplified48.6%
Taylor expanded in x around inf
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6431.1
Simplified31.1%
if -4e65 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.00000000000000007e193Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6467.9
Simplified67.9%
if 1.00000000000000007e193 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.8%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6494.0
Simplified94.0%
Taylor expanded in z around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f6470.0
Simplified70.0%
Taylor expanded in x around 0
associate-*r/N/A
metadata-evalN/A
associate-*r*N/A
lower-/.f64N/A
associate-*r*N/A
metadata-evalN/A
*-commutativeN/A
lower-*.f6450.9
Simplified50.9%
Final simplification61.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -4e+65)
(/ (* 60.0 x) z)
(if (<= t_1 2e+219) (* 120.0 a) (/ (* y -60.0) z)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -4e+65) {
tmp = (60.0 * x) / z;
} else if (t_1 <= 2e+219) {
tmp = 120.0 * a;
} else {
tmp = (y * -60.0) / z;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-4d+65)) then
tmp = (60.0d0 * x) / z
else if (t_1 <= 2d+219) then
tmp = 120.0d0 * a
else
tmp = (y * (-60.0d0)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -4e+65) {
tmp = (60.0 * x) / z;
} else if (t_1 <= 2e+219) {
tmp = 120.0 * a;
} else {
tmp = (y * -60.0) / z;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -4e+65: tmp = (60.0 * x) / z elif t_1 <= 2e+219: tmp = 120.0 * a else: tmp = (y * -60.0) / z return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -4e+65) tmp = Float64(Float64(60.0 * x) / z); elseif (t_1 <= 2e+219) tmp = Float64(120.0 * a); else tmp = Float64(Float64(y * -60.0) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -4e+65) tmp = (60.0 * x) / z; elseif (t_1 <= 2e+219) tmp = 120.0 * a; else tmp = (y * -60.0) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+65], N[(N[(60.0 * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 2e+219], N[(120.0 * a), $MachinePrecision], N[(N[(y * -60.0), $MachinePrecision] / z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+65}:\\
\;\;\;\;\frac{60 \cdot x}{z}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+219}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4e65Initial program 99.6%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6491.3
Simplified91.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower--.f6448.6
Simplified48.6%
Taylor expanded in x around inf
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6431.1
Simplified31.1%
if -4e65 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.99999999999999993e219Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6467.4
Simplified67.4%
if 1.99999999999999993e219 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.8%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6499.8
Simplified99.8%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower--.f6450.8
Simplified50.8%
Taylor expanded in x around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6434.7
Simplified34.7%
Final simplification59.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -4e+65)
(/ (* 60.0 x) z)
(if (<= t_1 1e+159) (* 120.0 a) (* -60.0 (/ x t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -4e+65) {
tmp = (60.0 * x) / z;
} else if (t_1 <= 1e+159) {
tmp = 120.0 * a;
} else {
tmp = -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) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-4d+65)) then
tmp = (60.0d0 * x) / z
else if (t_1 <= 1d+159) then
tmp = 120.0d0 * a
else
tmp = (-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 t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -4e+65) {
tmp = (60.0 * x) / z;
} else if (t_1 <= 1e+159) {
tmp = 120.0 * a;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -4e+65: tmp = (60.0 * x) / z elif t_1 <= 1e+159: tmp = 120.0 * a else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -4e+65) tmp = Float64(Float64(60.0 * x) / z); elseif (t_1 <= 1e+159) tmp = Float64(120.0 * a); else tmp = Float64(-60.0 * Float64(x / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -4e+65) tmp = (60.0 * x) / z; elseif (t_1 <= 1e+159) tmp = 120.0 * a; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+65], N[(N[(60.0 * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 1e+159], N[(120.0 * a), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+65}:\\
\;\;\;\;\frac{60 \cdot x}{z}\\
\mathbf{elif}\;t\_1 \leq 10^{+159}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4e65Initial program 99.6%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6491.3
Simplified91.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower--.f6448.6
Simplified48.6%
Taylor expanded in x around inf
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6431.1
Simplified31.1%
if -4e65 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999993e158Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6469.8
Simplified69.8%
if 9.9999999999999993e158 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6492.4
Simplified92.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f6464.9
Simplified64.9%
Taylor expanded in x around inf
lower-/.f6429.7
Simplified29.7%
Final simplification59.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -4e+65)
(* 60.0 (/ x z))
(if (<= t_1 1e+159) (* 120.0 a) (* -60.0 (/ x t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -4e+65) {
tmp = 60.0 * (x / z);
} else if (t_1 <= 1e+159) {
tmp = 120.0 * a;
} else {
tmp = -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) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-4d+65)) then
tmp = 60.0d0 * (x / z)
else if (t_1 <= 1d+159) then
tmp = 120.0d0 * a
else
tmp = (-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 t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -4e+65) {
tmp = 60.0 * (x / z);
} else if (t_1 <= 1e+159) {
tmp = 120.0 * a;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -4e+65: tmp = 60.0 * (x / z) elif t_1 <= 1e+159: tmp = 120.0 * a else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -4e+65) tmp = Float64(60.0 * Float64(x / z)); elseif (t_1 <= 1e+159) tmp = Float64(120.0 * a); else tmp = Float64(-60.0 * Float64(x / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -4e+65) tmp = 60.0 * (x / z); elseif (t_1 <= 1e+159) tmp = 120.0 * a; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+65], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+159], N[(120.0 * a), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+65}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{elif}\;t\_1 \leq 10^{+159}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -4e65Initial program 99.6%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6491.3
Simplified91.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-/.f64N/A
lower--.f6448.6
Simplified48.6%
Taylor expanded in x around inf
lower-/.f6431.0
Simplified31.0%
if -4e65 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999993e158Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6469.8
Simplified69.8%
if 9.9999999999999993e158 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.7%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6492.4
Simplified92.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f6464.9
Simplified64.9%
Taylor expanded in x around inf
lower-/.f6429.7
Simplified29.7%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* -60.0 (/ x t))) (t_2 (/ (* 60.0 (- x y)) (- z t)))) (if (<= t_2 -1e+182) t_1 (if (<= t_2 1e+159) (* 120.0 a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (x / t);
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -1e+182) {
tmp = t_1;
} else if (t_2 <= 1e+159) {
tmp = 120.0 * a;
} 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) :: t_2
real(8) :: tmp
t_1 = (-60.0d0) * (x / t)
t_2 = (60.0d0 * (x - y)) / (z - t)
if (t_2 <= (-1d+182)) then
tmp = t_1
else if (t_2 <= 1d+159) then
tmp = 120.0d0 * a
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 * (x / t);
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -1e+182) {
tmp = t_1;
} else if (t_2 <= 1e+159) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (x / t) t_2 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_2 <= -1e+182: tmp = t_1 elif t_2 <= 1e+159: tmp = 120.0 * a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(x / t)) t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_2 <= -1e+182) tmp = t_1; elseif (t_2 <= 1e+159) tmp = Float64(120.0 * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (x / t); t_2 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_2 <= -1e+182) tmp = t_1; elseif (t_2 <= 1e+159) tmp = 120.0 * a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+182], t$95$1, If[LessEqual[t$95$2, 1e+159], N[(120.0 * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x}{t}\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+182}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+159}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.0000000000000001e182 or 9.9999999999999993e158 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.8%
Taylor expanded in a around 0
associate-*r/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6494.4
Simplified94.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f6464.9
Simplified64.9%
Taylor expanded in x around inf
lower-/.f6432.9
Simplified32.9%
if -1.0000000000000001e182 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.9999999999999993e158Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6464.6
Simplified64.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma 60.0 (/ x (- z t)) (* 120.0 a))))
(if (<= x -1.05e+73)
t_1
(if (<= x 6.6e-40) (fma -60.0 (/ y (- z t)) (* 120.0 a)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(60.0, (x / (z - t)), (120.0 * a));
double tmp;
if (x <= -1.05e+73) {
tmp = t_1;
} else if (x <= 6.6e-40) {
tmp = fma(-60.0, (y / (z - t)), (120.0 * a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(60.0, Float64(x / Float64(z - t)), Float64(120.0 * a)) tmp = 0.0 if (x <= -1.05e+73) tmp = t_1; elseif (x <= 6.6e-40) tmp = fma(-60.0, Float64(y / Float64(z - t)), Float64(120.0 * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.05e+73], t$95$1, If[LessEqual[x, 6.6e-40], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(60, \frac{x}{z - t}, 120 \cdot a\right)\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6.6 \cdot 10^{-40}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{y}{z - t}, 120 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.0500000000000001e73 or 6.59999999999999986e-40 < x Initial program 99.8%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6490.0
Simplified90.0%
if -1.0500000000000001e73 < x < 6.59999999999999986e-40Initial program 99.8%
Taylor expanded in x around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6495.6
Simplified95.6%
(FPCore (x y z t a) :precision binary64 (* 120.0 a))
double code(double x, double y, double z, double t, double a) {
return 120.0 * a;
}
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 = 120.0d0 * a
end function
public static double code(double x, double y, double z, double t, double a) {
return 120.0 * a;
}
def code(x, y, z, t, a): return 120.0 * a
function code(x, y, z, t, a) return Float64(120.0 * a) end
function tmp = code(x, y, z, t, a) tmp = 120.0 * a; end
code[x_, y_, z_, t_, a_] := N[(120.0 * a), $MachinePrecision]
\begin{array}{l}
\\
120 \cdot a
\end{array}
Initial program 99.8%
Taylor expanded in z around inf
lower-*.f6453.3
Simplified53.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 2024215
(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)))