
(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 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (fma a 120.0 (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((60.0 / (z - t)) * (x - y)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)
\end{array}
Initial program 99.8%
+-commutative99.8%
fma-def99.8%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -1e+24)
(/ 60.0 (/ (- z t) (- x y)))
(if (<= t_1 5e-20)
(* a 120.0)
(if (<= t_1 1.2e+70)
(* 60.0 (/ (- x y) (- z t)))
(if (<= t_1 5e+94) (* a 120.0) 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 <= -1e+24) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (t_1 <= 5e-20) {
tmp = a * 120.0;
} else if (t_1 <= 1.2e+70) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (t_1 <= 5e+94) {
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 * (x - y)) / (z - t)
if (t_1 <= (-1d+24)) then
tmp = 60.0d0 / ((z - t) / (x - y))
else if (t_1 <= 5d-20) then
tmp = a * 120.0d0
else if (t_1 <= 1.2d+70) then
tmp = 60.0d0 * ((x - y) / (z - t))
else if (t_1 <= 5d+94) 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 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -1e+24) {
tmp = 60.0 / ((z - t) / (x - y));
} else if (t_1 <= 5e-20) {
tmp = a * 120.0;
} else if (t_1 <= 1.2e+70) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (t_1 <= 5e+94) {
tmp = a * 120.0;
} 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 <= -1e+24: tmp = 60.0 / ((z - t) / (x - y)) elif t_1 <= 5e-20: tmp = a * 120.0 elif t_1 <= 1.2e+70: tmp = 60.0 * ((x - y) / (z - t)) elif t_1 <= 5e+94: tmp = a * 120.0 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 <= -1e+24) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); elseif (t_1 <= 5e-20) tmp = Float64(a * 120.0); elseif (t_1 <= 1.2e+70) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (t_1 <= 5e+94) 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 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -1e+24) tmp = 60.0 / ((z - t) / (x - y)); elseif (t_1 <= 5e-20) tmp = a * 120.0; elseif (t_1 <= 1.2e+70) tmp = 60.0 * ((x - y) / (z - t)); elseif (t_1 <= 5e+94) tmp = a * 120.0; 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, -1e+24], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-20], N[(a * 120.0), $MachinePrecision], If[LessEqual[t$95$1, 1.2e+70], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+94], N[(a * 120.0), $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 -1 \cdot 10^{+24}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{-20}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t_1 \leq 1.2 \cdot 10^{+70}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+94}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -9.9999999999999998e23Initial program 99.6%
associate-/l*99.8%
Simplified99.8%
associate-/l*99.6%
clear-num99.7%
associate-/r/99.6%
Applied egg-rr99.6%
*-commutative99.6%
associate-*l*99.6%
metadata-eval99.6%
div-inv99.6%
times-frac99.8%
*-un-lft-identity99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 84.4%
associate-*r/84.4%
associate-/l*84.6%
Simplified84.6%
if -9.9999999999999998e23 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 4.9999999999999999e-20 or 1.19999999999999993e70 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 5.0000000000000001e94Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 83.8%
if 4.9999999999999999e-20 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 1.19999999999999993e70Initial program 99.5%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 67.3%
if 5.0000000000000001e94 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 85.0%
associate-*r/85.1%
Applied egg-rr85.1%
Final simplification82.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -5e+72)
(/ (- x y) (* (- z t) 0.016666666666666666))
(if (<= t_1 3e+186)
(+ (* a 120.0) (* 60.0 (/ x (- z t))))
(* 60.0 (/ (- x y) (- z 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 <= -5e+72) {
tmp = (x - y) / ((z - t) * 0.016666666666666666);
} else if (t_1 <= 3e+186) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} 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) :: t_1
real(8) :: tmp
t_1 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-5d+72)) then
tmp = (x - y) / ((z - t) * 0.016666666666666666d0)
else if (t_1 <= 3d+186) then
tmp = (a * 120.0d0) + (60.0d0 * (x / (z - t)))
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 t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e+72) {
tmp = (x - y) / ((z - t) * 0.016666666666666666);
} else if (t_1 <= 3e+186) {
tmp = (a * 120.0) + (60.0 * (x / (z - t)));
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -5e+72: tmp = (x - y) / ((z - t) * 0.016666666666666666) elif t_1 <= 3e+186: tmp = (a * 120.0) + (60.0 * (x / (z - t))) else: tmp = 60.0 * ((x - y) / (z - 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 <= -5e+72) tmp = Float64(Float64(x - y) / Float64(Float64(z - t) * 0.016666666666666666)); elseif (t_1 <= 3e+186) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / Float64(z - t)))); 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) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -5e+72) tmp = (x - y) / ((z - t) * 0.016666666666666666); elseif (t_1 <= 3e+186) tmp = (a * 120.0) + (60.0 * (x / (z - t))); else tmp = 60.0 * ((x - y) / (z - 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, -5e+72], N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 3e+186], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+72}:\\
\;\;\;\;\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}\\
\mathbf{elif}\;t_1 \leq 3 \cdot 10^{+186}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -4.99999999999999992e72Initial program 99.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 90.5%
metadata-eval90.5%
times-frac90.8%
*-un-lft-identity90.8%
*-commutative90.8%
Applied egg-rr90.8%
if -4.99999999999999992e72 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 2.99999999999999982e186Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 87.8%
if 2.99999999999999982e186 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 93.4%
Final simplification88.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (- x y) -5e+75)
t_1
(if (<= (- x y) 2e-34)
(* a 120.0)
(if (<= (- x y) 4e+203) (+ (* a 120.0) (* 60.0 (/ y t))) 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 ((x - y) <= -5e+75) {
tmp = t_1;
} else if ((x - y) <= 2e-34) {
tmp = a * 120.0;
} else if ((x - y) <= 4e+203) {
tmp = (a * 120.0) + (60.0 * (y / t));
} 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 ((x - y) <= (-5d+75)) then
tmp = t_1
else if ((x - y) <= 2d-34) then
tmp = a * 120.0d0
else if ((x - y) <= 4d+203) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
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 ((x - y) <= -5e+75) {
tmp = t_1;
} else if ((x - y) <= 2e-34) {
tmp = a * 120.0;
} else if ((x - y) <= 4e+203) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (x - y) <= -5e+75: tmp = t_1 elif (x - y) <= 2e-34: tmp = a * 120.0 elif (x - y) <= 4e+203: tmp = (a * 120.0) + (60.0 * (y / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(x - y) <= -5e+75) tmp = t_1; elseif (Float64(x - y) <= 2e-34) tmp = Float64(a * 120.0); elseif (Float64(x - y) <= 4e+203) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); 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 ((x - y) <= -5e+75) tmp = t_1; elseif ((x - y) <= 2e-34) tmp = a * 120.0; elseif ((x - y) <= 4e+203) tmp = (a * 120.0) + (60.0 * (y / t)); 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] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x - y), $MachinePrecision], -5e+75], t$95$1, If[LessEqual[N[(x - y), $MachinePrecision], 2e-34], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], 4e+203], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;x - y \leq -5 \cdot 10^{+75}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x - y \leq 2 \cdot 10^{-34}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x - y \leq 4 \cdot 10^{+203}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (-.f64 x y) < -5.0000000000000002e75 or 4e203 < (-.f64 x y) Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 69.8%
if -5.0000000000000002e75 < (-.f64 x y) < 1.99999999999999986e-34Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 89.1%
if 1.99999999999999986e-34 < (-.f64 x y) < 4e203Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 81.7%
associate-*r/27.4%
Simplified81.7%
Taylor expanded in z around 0 67.9%
Final simplification75.3%
(FPCore (x y z t a)
:precision binary64
(if (<= (- x y) -5e+75)
(/ 60.0 (/ (- z t) (- x y)))
(if (<= (- x y) 2e-34)
(* a 120.0)
(if (<= (- x y) 4e+203)
(+ (* a 120.0) (* 60.0 (/ y t)))
(* 60.0 (/ (- x y) (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x - y) <= -5e+75) {
tmp = 60.0 / ((z - t) / (x - y));
} else if ((x - y) <= 2e-34) {
tmp = a * 120.0;
} else if ((x - y) <= 4e+203) {
tmp = (a * 120.0) + (60.0 * (y / t));
} 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 ((x - y) <= (-5d+75)) then
tmp = 60.0d0 / ((z - t) / (x - y))
else if ((x - y) <= 2d-34) then
tmp = a * 120.0d0
else if ((x - y) <= 4d+203) then
tmp = (a * 120.0d0) + (60.0d0 * (y / t))
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 ((x - y) <= -5e+75) {
tmp = 60.0 / ((z - t) / (x - y));
} else if ((x - y) <= 2e-34) {
tmp = a * 120.0;
} else if ((x - y) <= 4e+203) {
tmp = (a * 120.0) + (60.0 * (y / t));
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x - y) <= -5e+75: tmp = 60.0 / ((z - t) / (x - y)) elif (x - y) <= 2e-34: tmp = a * 120.0 elif (x - y) <= 4e+203: tmp = (a * 120.0) + (60.0 * (y / t)) else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(x - y) <= -5e+75) tmp = Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))); elseif (Float64(x - y) <= 2e-34) tmp = Float64(a * 120.0); elseif (Float64(x - y) <= 4e+203) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(y / t))); 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 ((x - y) <= -5e+75) tmp = 60.0 / ((z - t) / (x - y)); elseif ((x - y) <= 2e-34) tmp = a * 120.0; elseif ((x - y) <= 4e+203) tmp = (a * 120.0) + (60.0 * (y / t)); else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x - y), $MachinePrecision], -5e+75], N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], 2e-34], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(x - y), $MachinePrecision], 4e+203], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x - y \leq -5 \cdot 10^{+75}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x - y}}\\
\mathbf{elif}\;x - y \leq 2 \cdot 10^{-34}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x - y \leq 4 \cdot 10^{+203}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (-.f64 x y) < -5.0000000000000002e75Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/l*99.7%
clear-num99.6%
associate-/r/99.7%
Applied egg-rr99.7%
*-commutative99.7%
associate-*l*99.6%
metadata-eval99.6%
div-inv99.6%
times-frac99.8%
*-un-lft-identity99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 67.6%
associate-*r/67.6%
associate-/l*67.6%
Simplified67.6%
if -5.0000000000000002e75 < (-.f64 x y) < 1.99999999999999986e-34Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 89.1%
if 1.99999999999999986e-34 < (-.f64 x y) < 4e203Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 81.7%
associate-*r/27.4%
Simplified81.7%
Taylor expanded in z around 0 67.9%
if 4e203 < (-.f64 x y) Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 75.1%
Final simplification75.3%
(FPCore (x y z t a)
:precision binary64
(if (<= (- z t) -1e-45)
(* a 120.0)
(if (<= (- z t) 2e-152)
(* -60.0 (/ (- x y) t))
(if (<= (- z t) 1e-23) (* (/ 60.0 (- z t)) x) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -1e-45) {
tmp = a * 120.0;
} else if ((z - t) <= 2e-152) {
tmp = -60.0 * ((x - y) / t);
} else if ((z - t) <= 1e-23) {
tmp = (60.0 / (z - 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 ((z - t) <= (-1d-45)) then
tmp = a * 120.0d0
else if ((z - t) <= 2d-152) then
tmp = (-60.0d0) * ((x - y) / t)
else if ((z - t) <= 1d-23) then
tmp = (60.0d0 / (z - 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 ((z - t) <= -1e-45) {
tmp = a * 120.0;
} else if ((z - t) <= 2e-152) {
tmp = -60.0 * ((x - y) / t);
} else if ((z - t) <= 1e-23) {
tmp = (60.0 / (z - t)) * x;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z - t) <= -1e-45: tmp = a * 120.0 elif (z - t) <= 2e-152: tmp = -60.0 * ((x - y) / t) elif (z - t) <= 1e-23: tmp = (60.0 / (z - t)) * x else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(z - t) <= -1e-45) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= 2e-152) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); elseif (Float64(z - t) <= 1e-23) tmp = Float64(Float64(60.0 / Float64(z - 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 ((z - t) <= -1e-45) tmp = a * 120.0; elseif ((z - t) <= 2e-152) tmp = -60.0 * ((x - y) / t); elseif ((z - t) <= 1e-23) tmp = (60.0 / (z - t)) * x; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -1e-45], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 2e-152], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 1e-23], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -1 \cdot 10^{-45}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq 2 \cdot 10^{-152}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;z - t \leq 10^{-23}:\\
\;\;\;\;\frac{60}{z - t} \cdot x\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -9.99999999999999984e-46 or 9.9999999999999996e-24 < (-.f64 z t) Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 65.6%
if -9.99999999999999984e-46 < (-.f64 z t) < 2.00000000000000013e-152Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 90.4%
Taylor expanded in z around 0 55.4%
if 2.00000000000000013e-152 < (-.f64 z t) < 9.9999999999999996e-24Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/l*99.7%
clear-num99.4%
associate-/r/99.6%
Applied egg-rr99.6%
*-commutative99.6%
associate-*l*99.6%
metadata-eval99.6%
div-inv99.8%
times-frac99.8%
*-un-lft-identity99.8%
*-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 93.6%
associate-*r/93.4%
associate-/l*93.5%
Simplified93.5%
Taylor expanded in x around inf 73.5%
associate-*r/79.5%
associate-*l/79.7%
*-commutative79.7%
Simplified73.5%
Final simplification65.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.4e+42)
(* a 120.0)
(if (or (<= a -6.8e-13) (and (not (<= a -1.25e-30)) (<= a 2.9e-79)))
(* 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 <= -3.4e+42) {
tmp = a * 120.0;
} else if ((a <= -6.8e-13) || (!(a <= -1.25e-30) && (a <= 2.9e-79))) {
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 <= (-3.4d+42)) then
tmp = a * 120.0d0
else if ((a <= (-6.8d-13)) .or. (.not. (a <= (-1.25d-30))) .and. (a <= 2.9d-79)) 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 <= -3.4e+42) {
tmp = a * 120.0;
} else if ((a <= -6.8e-13) || (!(a <= -1.25e-30) && (a <= 2.9e-79))) {
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 <= -3.4e+42: tmp = a * 120.0 elif (a <= -6.8e-13) or (not (a <= -1.25e-30) and (a <= 2.9e-79)): 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 <= -3.4e+42) tmp = Float64(a * 120.0); elseif ((a <= -6.8e-13) || (!(a <= -1.25e-30) && (a <= 2.9e-79))) 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 <= -3.4e+42) tmp = a * 120.0; elseif ((a <= -6.8e-13) || (~((a <= -1.25e-30)) && (a <= 2.9e-79))) 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, -3.4e+42], N[(a * 120.0), $MachinePrecision], If[Or[LessEqual[a, -6.8e-13], And[N[Not[LessEqual[a, -1.25e-30]], $MachinePrecision], LessEqual[a, 2.9e-79]]], 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 -3.4 \cdot 10^{+42}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -6.8 \cdot 10^{-13} \lor \neg \left(a \leq -1.25 \cdot 10^{-30}\right) \land a \leq 2.9 \cdot 10^{-79}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -3.39999999999999975e42 or -6.80000000000000031e-13 < a < -1.24999999999999993e-30 or 2.9000000000000001e-79 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 80.0%
if -3.39999999999999975e42 < a < -6.80000000000000031e-13 or -1.24999999999999993e-30 < a < 2.9000000000000001e-79Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 76.3%
Final simplification78.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= a -2.6e+42)
(* a 120.0)
(if (<= a -4.2e+23)
t_1
(if (<= a -5.5e-30)
(+ (* a 120.0) (* -60.0 (/ y z)))
(if (<= a 2.8e-79) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if (a <= -2.6e+42) {
tmp = a * 120.0;
} else if (a <= -4.2e+23) {
tmp = t_1;
} else if (a <= -5.5e-30) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if (a <= 2.8e-79) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
if (a <= (-2.6d+42)) then
tmp = a * 120.0d0
else if (a <= (-4.2d+23)) then
tmp = t_1
else if (a <= (-5.5d-30)) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / z))
else if (a <= 2.8d-79) then
tmp = t_1
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 t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if (a <= -2.6e+42) {
tmp = a * 120.0;
} else if (a <= -4.2e+23) {
tmp = t_1;
} else if (a <= -5.5e-30) {
tmp = (a * 120.0) + (-60.0 * (y / z));
} else if (a <= 2.8e-79) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if a <= -2.6e+42: tmp = a * 120.0 elif a <= -4.2e+23: tmp = t_1 elif a <= -5.5e-30: tmp = (a * 120.0) + (-60.0 * (y / z)) elif a <= 2.8e-79: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (a <= -2.6e+42) tmp = Float64(a * 120.0); elseif (a <= -4.2e+23) tmp = t_1; elseif (a <= -5.5e-30) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / z))); elseif (a <= 2.8e-79) tmp = t_1; else tmp = Float64(a * 120.0); 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 (a <= -2.6e+42) tmp = a * 120.0; elseif (a <= -4.2e+23) tmp = t_1; elseif (a <= -5.5e-30) tmp = (a * 120.0) + (-60.0 * (y / z)); elseif (a <= 2.8e-79) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.6e+42], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -4.2e+23], t$95$1, If[LessEqual[a, -5.5e-30], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.8e-79], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \leq -2.6 \cdot 10^{+42}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -4.2 \cdot 10^{+23}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -5.5 \cdot 10^{-30}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{-79}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.5999999999999999e42 or 2.80000000000000012e-79 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.5%
if -2.5999999999999999e42 < a < -4.2000000000000003e23 or -5.49999999999999976e-30 < a < 2.80000000000000012e-79Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.2%
if -4.2000000000000003e23 < a < -5.49999999999999976e-30Initial program 99.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 89.4%
associate-*r/25.1%
Simplified89.1%
Taylor expanded in t around 0 77.1%
Final simplification78.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.15e-30)
(* a 120.0)
(if (or (<= a -1.85e-65) (and (not (<= a -5.3e-134)) (<= a 2.6e-79)))
(* -60.0 (/ (- x y) t))
(* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.15e-30) {
tmp = a * 120.0;
} else if ((a <= -1.85e-65) || (!(a <= -5.3e-134) && (a <= 2.6e-79))) {
tmp = -60.0 * ((x - 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 <= (-1.15d-30)) then
tmp = a * 120.0d0
else if ((a <= (-1.85d-65)) .or. (.not. (a <= (-5.3d-134))) .and. (a <= 2.6d-79)) then
tmp = (-60.0d0) * ((x - 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 <= -1.15e-30) {
tmp = a * 120.0;
} else if ((a <= -1.85e-65) || (!(a <= -5.3e-134) && (a <= 2.6e-79))) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.15e-30: tmp = a * 120.0 elif (a <= -1.85e-65) or (not (a <= -5.3e-134) and (a <= 2.6e-79)): tmp = -60.0 * ((x - y) / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.15e-30) tmp = Float64(a * 120.0); elseif ((a <= -1.85e-65) || (!(a <= -5.3e-134) && (a <= 2.6e-79))) tmp = Float64(-60.0 * Float64(Float64(x - 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 <= -1.15e-30) tmp = a * 120.0; elseif ((a <= -1.85e-65) || (~((a <= -5.3e-134)) && (a <= 2.6e-79))) tmp = -60.0 * ((x - y) / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.15e-30], N[(a * 120.0), $MachinePrecision], If[Or[LessEqual[a, -1.85e-65], And[N[Not[LessEqual[a, -5.3e-134]], $MachinePrecision], LessEqual[a, 2.6e-79]]], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.15 \cdot 10^{-30}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -1.85 \cdot 10^{-65} \lor \neg \left(a \leq -5.3 \cdot 10^{-134}\right) \land a \leq 2.6 \cdot 10^{-79}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.14999999999999992e-30 or -1.85e-65 < a < -5.30000000000000003e-134 or 2.59999999999999994e-79 < a Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 73.1%
if -1.14999999999999992e-30 < a < -1.85e-65 or -5.30000000000000003e-134 < a < 2.59999999999999994e-79Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 85.2%
Taylor expanded in z around 0 48.4%
Final simplification65.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ -60.0 (- z t)))))
(if (<= y -2.55e+103)
t_1
(if (<= y 1.6e-112)
(* a 120.0)
(if (<= y 1.15e-81)
(* (/ 60.0 (- z t)) x)
(if (<= y 4e+88) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (-60.0 / (z - t));
double tmp;
if (y <= -2.55e+103) {
tmp = t_1;
} else if (y <= 1.6e-112) {
tmp = a * 120.0;
} else if (y <= 1.15e-81) {
tmp = (60.0 / (z - t)) * x;
} else if (y <= 4e+88) {
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 = y * ((-60.0d0) / (z - t))
if (y <= (-2.55d+103)) then
tmp = t_1
else if (y <= 1.6d-112) then
tmp = a * 120.0d0
else if (y <= 1.15d-81) then
tmp = (60.0d0 / (z - t)) * x
else if (y <= 4d+88) 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 = y * (-60.0 / (z - t));
double tmp;
if (y <= -2.55e+103) {
tmp = t_1;
} else if (y <= 1.6e-112) {
tmp = a * 120.0;
} else if (y <= 1.15e-81) {
tmp = (60.0 / (z - t)) * x;
} else if (y <= 4e+88) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (-60.0 / (z - t)) tmp = 0 if y <= -2.55e+103: tmp = t_1 elif y <= 1.6e-112: tmp = a * 120.0 elif y <= 1.15e-81: tmp = (60.0 / (z - t)) * x elif y <= 4e+88: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(-60.0 / Float64(z - t))) tmp = 0.0 if (y <= -2.55e+103) tmp = t_1; elseif (y <= 1.6e-112) tmp = Float64(a * 120.0); elseif (y <= 1.15e-81) tmp = Float64(Float64(60.0 / Float64(z - t)) * x); elseif (y <= 4e+88) tmp = Float64(a * 120.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (-60.0 / (z - t)); tmp = 0.0; if (y <= -2.55e+103) tmp = t_1; elseif (y <= 1.6e-112) tmp = a * 120.0; elseif (y <= 1.15e-81) tmp = (60.0 / (z - t)) * x; elseif (y <= 4e+88) tmp = a * 120.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.55e+103], t$95$1, If[LessEqual[y, 1.6e-112], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, 1.15e-81], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 4e+88], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{-60}{z - t}\\
\mathbf{if}\;y \leq -2.55 \cdot 10^{+103}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-112}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-81}:\\
\;\;\;\;\frac{60}{z - t} \cdot x\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+88}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.5500000000000001e103 or 3.99999999999999984e88 < y Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
associate-/l*99.7%
clear-num99.7%
associate-/r/99.7%
Applied egg-rr99.7%
*-commutative99.7%
associate-*l*99.6%
metadata-eval99.6%
div-inv99.6%
times-frac99.7%
*-un-lft-identity99.7%
*-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 60.0%
associate-*r/60.1%
*-commutative60.1%
associate-*r/60.2%
Simplified60.2%
if -2.5500000000000001e103 < y < 1.59999999999999997e-112 or 1.14999999999999996e-81 < y < 3.99999999999999984e88Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 71.5%
if 1.59999999999999997e-112 < y < 1.14999999999999996e-81Initial program 99.1%
associate-/l*99.4%
Simplified99.4%
associate-/l*99.1%
clear-num98.8%
associate-/r/99.4%
Applied egg-rr99.4%
*-commutative99.4%
associate-*l*99.4%
metadata-eval99.4%
div-inv99.7%
times-frac99.4%
*-un-lft-identity99.4%
*-commutative99.4%
Applied egg-rr99.4%
Taylor expanded in a around 0 99.7%
associate-*r/99.1%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in x around inf 99.7%
associate-*r/99.1%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
Final simplification68.4%
(FPCore (x y z t a)
:precision binary64
(if (<= y -4.5e+102)
(* y (/ -60.0 (- z t)))
(if (<= y 2.3e-113)
(* a 120.0)
(if (<= y 6e-82)
(* (/ 60.0 (- z t)) x)
(if (<= y 1.7e+89) (* a 120.0) (/ (* y -60.0) (- z t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -4.5e+102) {
tmp = y * (-60.0 / (z - t));
} else if (y <= 2.3e-113) {
tmp = a * 120.0;
} else if (y <= 6e-82) {
tmp = (60.0 / (z - t)) * x;
} else if (y <= 1.7e+89) {
tmp = a * 120.0;
} else {
tmp = (y * -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 <= (-4.5d+102)) then
tmp = y * ((-60.0d0) / (z - t))
else if (y <= 2.3d-113) then
tmp = a * 120.0d0
else if (y <= 6d-82) then
tmp = (60.0d0 / (z - t)) * x
else if (y <= 1.7d+89) then
tmp = a * 120.0d0
else
tmp = (y * (-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 <= -4.5e+102) {
tmp = y * (-60.0 / (z - t));
} else if (y <= 2.3e-113) {
tmp = a * 120.0;
} else if (y <= 6e-82) {
tmp = (60.0 / (z - t)) * x;
} else if (y <= 1.7e+89) {
tmp = a * 120.0;
} else {
tmp = (y * -60.0) / (z - t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -4.5e+102: tmp = y * (-60.0 / (z - t)) elif y <= 2.3e-113: tmp = a * 120.0 elif y <= 6e-82: tmp = (60.0 / (z - t)) * x elif y <= 1.7e+89: tmp = a * 120.0 else: tmp = (y * -60.0) / (z - t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -4.5e+102) tmp = Float64(y * Float64(-60.0 / Float64(z - t))); elseif (y <= 2.3e-113) tmp = Float64(a * 120.0); elseif (y <= 6e-82) tmp = Float64(Float64(60.0 / Float64(z - t)) * x); elseif (y <= 1.7e+89) tmp = Float64(a * 120.0); else tmp = Float64(Float64(y * -60.0) / Float64(z - t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -4.5e+102) tmp = y * (-60.0 / (z - t)); elseif (y <= 2.3e-113) tmp = a * 120.0; elseif (y <= 6e-82) tmp = (60.0 / (z - t)) * x; elseif (y <= 1.7e+89) tmp = a * 120.0; else tmp = (y * -60.0) / (z - t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -4.5e+102], N[(y * N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.3e-113], N[(a * 120.0), $MachinePrecision], If[LessEqual[y, 6e-82], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 1.7e+89], N[(a * 120.0), $MachinePrecision], N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.5 \cdot 10^{+102}:\\
\;\;\;\;y \cdot \frac{-60}{z - t}\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-113}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-82}:\\
\;\;\;\;\frac{60}{z - t} \cdot x\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+89}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if y < -4.50000000000000021e102Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
associate-/l*99.7%
clear-num99.8%
associate-/r/99.7%
Applied egg-rr99.7%
*-commutative99.7%
associate-*l*99.6%
metadata-eval99.6%
div-inv99.6%
times-frac99.7%
*-un-lft-identity99.7%
*-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 52.7%
associate-*r/52.7%
*-commutative52.7%
associate-*r/52.9%
Simplified52.9%
if -4.50000000000000021e102 < y < 2.30000000000000008e-113 or 5.9999999999999998e-82 < y < 1.7000000000000001e89Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 71.5%
if 2.30000000000000008e-113 < y < 5.9999999999999998e-82Initial program 99.1%
associate-/l*99.4%
Simplified99.4%
associate-/l*99.1%
clear-num98.8%
associate-/r/99.4%
Applied egg-rr99.4%
*-commutative99.4%
associate-*l*99.4%
metadata-eval99.4%
div-inv99.7%
times-frac99.4%
*-un-lft-identity99.4%
*-commutative99.4%
Applied egg-rr99.4%
Taylor expanded in a around 0 99.7%
associate-*r/99.1%
associate-/l*99.4%
Simplified99.4%
Taylor expanded in x around inf 99.7%
associate-*r/99.1%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
if 1.7000000000000001e89 < y Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
associate-/l*99.7%
clear-num99.6%
associate-/r/99.7%
Applied egg-rr99.7%
*-commutative99.7%
associate-*l*99.6%
metadata-eval99.6%
div-inv99.6%
times-frac99.7%
*-un-lft-identity99.7%
*-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 81.0%
associate-*r/81.1%
associate-/l*81.1%
Simplified81.1%
Taylor expanded in x around 0 67.1%
associate-*r/67.2%
Simplified67.2%
Final simplification68.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= y -3e+23)
t_1
(if (<= y 1.6e-80)
(+ (* a 120.0) (* 60.0 (/ x z)))
(if (<= y 2.4e+73) (* a 120.0) 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 (y <= -3e+23) {
tmp = t_1;
} else if (y <= 1.6e-80) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if (y <= 2.4e+73) {
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 * ((x - y) / (z - t))
if (y <= (-3d+23)) then
tmp = t_1
else if (y <= 1.6d-80) then
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
else if (y <= 2.4d+73) 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 * ((x - y) / (z - t));
double tmp;
if (y <= -3e+23) {
tmp = t_1;
} else if (y <= 1.6e-80) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if (y <= 2.4e+73) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if y <= -3e+23: tmp = t_1 elif y <= 1.6e-80: tmp = (a * 120.0) + (60.0 * (x / z)) elif y <= 2.4e+73: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (y <= -3e+23) tmp = t_1; elseif (y <= 1.6e-80) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); elseif (y <= 2.4e+73) 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 * ((x - y) / (z - t)); tmp = 0.0; if (y <= -3e+23) tmp = t_1; elseif (y <= 1.6e-80) tmp = (a * 120.0) + (60.0 * (x / z)); elseif (y <= 2.4e+73) 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[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3e+23], t$95$1, If[LessEqual[y, 1.6e-80], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+73], N[(a * 120.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;y \leq -3 \cdot 10^{+23}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-80}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+73}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -3.0000000000000001e23 or 2.40000000000000002e73 < y Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 71.4%
if -3.0000000000000001e23 < y < 1.5999999999999999e-80Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 96.8%
associate-*r/96.8%
associate-*l/96.8%
*-commutative96.8%
Simplified96.8%
Taylor expanded in z around inf 75.6%
if 1.5999999999999999e-80 < y < 2.40000000000000002e73Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 82.1%
Final simplification74.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.3e+77) (not (<= y 3e+83))) (+ (/ (* y -60.0) (- z t)) (* a 120.0)) (+ (* (/ 60.0 (- z t)) x) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.3e+77) || !(y <= 3e+83)) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = ((60.0 / (z - t)) * x) + (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.3d+77)) .or. (.not. (y <= 3d+83))) then
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
else
tmp = ((60.0d0 / (z - t)) * x) + (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.3e+77) || !(y <= 3e+83)) {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
} else {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.3e+77) or not (y <= 3e+83): tmp = ((y * -60.0) / (z - t)) + (a * 120.0) else: tmp = ((60.0 / (z - t)) * x) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.3e+77) || !(y <= 3e+83)) tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(60.0 / Float64(z - t)) * x) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.3e+77) || ~((y <= 3e+83))) tmp = ((y * -60.0) / (z - t)) + (a * 120.0); else tmp = ((60.0 / (z - t)) * x) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.3e+77], N[Not[LessEqual[y, 3e+83]], $MachinePrecision]], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+77} \lor \neg \left(y \leq 3 \cdot 10^{+83}\right):\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\
\end{array}
\end{array}
if y < -1.3000000000000001e77 or 3e83 < y Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 85.3%
associate-*r/58.3%
Simplified85.4%
if -1.3000000000000001e77 < y < 3e83Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 95.9%
associate-*r/95.9%
associate-*l/95.9%
*-commutative95.9%
Simplified95.9%
Final simplification92.2%
(FPCore (x y z t a)
:precision binary64
(if (<= y -3e+76)
(+ (/ 60.0 (/ (- t z) y)) (* a 120.0))
(if (<= y 4e+78)
(+ (* (/ 60.0 (- z t)) x) (* a 120.0))
(+ (/ (* y -60.0) (- z t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -3e+76) {
tmp = (60.0 / ((t - z) / y)) + (a * 120.0);
} else if (y <= 4e+78) {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-3d+76)) then
tmp = (60.0d0 / ((t - z) / y)) + (a * 120.0d0)
else if (y <= 4d+78) then
tmp = ((60.0d0 / (z - t)) * x) + (a * 120.0d0)
else
tmp = ((y * (-60.0d0)) / (z - t)) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -3e+76) {
tmp = (60.0 / ((t - z) / y)) + (a * 120.0);
} else if (y <= 4e+78) {
tmp = ((60.0 / (z - t)) * x) + (a * 120.0);
} else {
tmp = ((y * -60.0) / (z - t)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -3e+76: tmp = (60.0 / ((t - z) / y)) + (a * 120.0) elif y <= 4e+78: tmp = ((60.0 / (z - t)) * x) + (a * 120.0) else: tmp = ((y * -60.0) / (z - t)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -3e+76) tmp = Float64(Float64(60.0 / Float64(Float64(t - z) / y)) + Float64(a * 120.0)); elseif (y <= 4e+78) tmp = Float64(Float64(Float64(60.0 / Float64(z - t)) * x) + Float64(a * 120.0)); else tmp = Float64(Float64(Float64(y * -60.0) / Float64(z - t)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -3e+76) tmp = (60.0 / ((t - z) / y)) + (a * 120.0); elseif (y <= 4e+78) tmp = ((60.0 / (z - t)) * x) + (a * 120.0); else tmp = ((y * -60.0) / (z - t)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -3e+76], N[(N[(60.0 / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e+78], N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+76}:\\
\;\;\;\;\frac{60}{\frac{t - z}{y}} + a \cdot 120\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+78}:\\
\;\;\;\;\frac{60}{z - t} \cdot x + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if y < -2.9999999999999998e76Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 84.9%
associate-*r/84.9%
neg-mul-184.9%
Simplified84.9%
if -2.9999999999999998e76 < y < 4.00000000000000003e78Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 95.9%
associate-*r/95.9%
associate-*l/95.9%
*-commutative95.9%
Simplified95.9%
if 4.00000000000000003e78 < y Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around 0 85.9%
associate-*r/65.8%
Simplified86.1%
Final simplification92.2%
(FPCore (x y z t a) :precision binary64 (+ (* (/ 60.0 (- z t)) (- x y)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 / (z - t)) * (x - y)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 / (z - t)) * (x - y)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 / (z - t)) * (x - y)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 / (z - t)) * (x - y)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 / (z - t)) * (x - y)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{z - t} \cdot \left(x - y\right) + a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4e-137)
(* a 120.0)
(if (<= a 2.6e-306)
(* -60.0 (/ x t))
(if (<= a 6.5e-177) (* 60.0 (/ x z)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4e-137) {
tmp = a * 120.0;
} else if (a <= 2.6e-306) {
tmp = -60.0 * (x / t);
} else if (a <= 6.5e-177) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-4d-137)) then
tmp = a * 120.0d0
else if (a <= 2.6d-306) then
tmp = (-60.0d0) * (x / t)
else if (a <= 6.5d-177) then
tmp = 60.0d0 * (x / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4e-137) {
tmp = a * 120.0;
} else if (a <= 2.6e-306) {
tmp = -60.0 * (x / t);
} else if (a <= 6.5e-177) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4e-137: tmp = a * 120.0 elif a <= 2.6e-306: tmp = -60.0 * (x / t) elif a <= 6.5e-177: tmp = 60.0 * (x / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4e-137) tmp = Float64(a * 120.0); elseif (a <= 2.6e-306) tmp = Float64(-60.0 * Float64(x / t)); elseif (a <= 6.5e-177) tmp = Float64(60.0 * Float64(x / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4e-137) tmp = a * 120.0; elseif (a <= 2.6e-306) tmp = -60.0 * (x / t); elseif (a <= 6.5e-177) tmp = 60.0 * (x / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4e-137], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 2.6e-306], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.5e-177], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{-137}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{-306}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-177}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -3.99999999999999991e-137 or 6.4999999999999998e-177 < a Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 66.1%
if -3.99999999999999991e-137 < a < 2.6e-306Initial program 99.5%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 69.8%
associate-*r/69.8%
associate-*l/69.9%
*-commutative69.9%
Simplified69.9%
Taylor expanded in z around 0 55.6%
fma-def55.6%
Simplified55.6%
Taylor expanded in a around 0 44.7%
if 2.6e-306 < a < 6.4999999999999998e-177Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 65.7%
associate-*r/65.7%
associate-*l/65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in z around inf 51.7%
Taylor expanded in a around 0 41.1%
Final simplification61.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.9e-137) (not (<= a 2.25e-274))) (* a 120.0) (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.9e-137) || !(a <= 2.25e-274)) {
tmp = a * 120.0;
} 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) :: tmp
if ((a <= (-4.9d-137)) .or. (.not. (a <= 2.25d-274))) then
tmp = a * 120.0d0
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 tmp;
if ((a <= -4.9e-137) || !(a <= 2.25e-274)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4.9e-137) or not (a <= 2.25e-274): tmp = a * 120.0 else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.9e-137) || !(a <= 2.25e-274)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(x / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4.9e-137) || ~((a <= 2.25e-274))) tmp = a * 120.0; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.9e-137], N[Not[LessEqual[a, 2.25e-274]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.9 \cdot 10^{-137} \lor \neg \left(a \leq 2.25 \cdot 10^{-274}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if a < -4.8999999999999996e-137 or 2.24999999999999996e-274 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 61.4%
if -4.8999999999999996e-137 < a < 2.24999999999999996e-274Initial program 99.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 70.5%
associate-*r/70.5%
associate-*l/70.6%
*-commutative70.6%
Simplified70.6%
Taylor expanded in z around 0 51.7%
fma-def51.7%
Simplified51.7%
Taylor expanded in a around 0 42.3%
Final simplification59.2%
(FPCore (x y z t a) :precision binary64 (if (<= y 1.7e+167) (* a 120.0) (* -60.0 (/ y z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 1.7e+167) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= 1.7d+167) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 1.7e+167) {
tmp = a * 120.0;
} else {
tmp = -60.0 * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 1.7e+167: tmp = a * 120.0 else: tmp = -60.0 * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 1.7e+167) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 1.7e+167) tmp = a * 120.0; else tmp = -60.0 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 1.7e+167], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.7 \cdot 10^{+167}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < 1.7e167Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 61.6%
if 1.7e167 < y Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 89.5%
Taylor expanded in z around inf 49.3%
Taylor expanded in x around 0 39.7%
Final simplification59.1%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 55.8%
Final simplification55.8%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
herbie shell --seed 2023173
(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)))