
(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 20 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)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return fma(60.0, ((x - y) / (z - t)), (a * 120.0));
}
function code(x, y, z, t, a) return fma(60.0, Float64(Float64(x - y) / Float64(z - t)), Float64(a * 120.0)) end
code[x_, y_, z_, t_, a_] := N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(60, \frac{x - y}{z - t}, a \cdot 120\right)
\end{array}
Initial program 99.8%
associate-*r/99.8%
fma-def99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ y (- z t)))) (t_2 (* 60.0 (/ x (- z t)))))
(if (<= x -7.2e+150)
t_2
(if (<= x 4.3e-234)
(* a 120.0)
(if (<= x 2.75e-157)
t_1
(if (<= x 2.1e-112)
(* a 120.0)
(if (<= x 1.25e-91) t_1 (if (<= x 1.85e+93) (* a 120.0) t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double t_2 = 60.0 * (x / (z - t));
double tmp;
if (x <= -7.2e+150) {
tmp = t_2;
} else if (x <= 4.3e-234) {
tmp = a * 120.0;
} else if (x <= 2.75e-157) {
tmp = t_1;
} else if (x <= 2.1e-112) {
tmp = a * 120.0;
} else if (x <= 1.25e-91) {
tmp = t_1;
} else if (x <= 1.85e+93) {
tmp = a * 120.0;
} else {
tmp = t_2;
}
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) * (y / (z - t))
t_2 = 60.0d0 * (x / (z - t))
if (x <= (-7.2d+150)) then
tmp = t_2
else if (x <= 4.3d-234) then
tmp = a * 120.0d0
else if (x <= 2.75d-157) then
tmp = t_1
else if (x <= 2.1d-112) then
tmp = a * 120.0d0
else if (x <= 1.25d-91) then
tmp = t_1
else if (x <= 1.85d+93) then
tmp = a * 120.0d0
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double t_2 = 60.0 * (x / (z - t));
double tmp;
if (x <= -7.2e+150) {
tmp = t_2;
} else if (x <= 4.3e-234) {
tmp = a * 120.0;
} else if (x <= 2.75e-157) {
tmp = t_1;
} else if (x <= 2.1e-112) {
tmp = a * 120.0;
} else if (x <= 1.25e-91) {
tmp = t_1;
} else if (x <= 1.85e+93) {
tmp = a * 120.0;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) t_2 = 60.0 * (x / (z - t)) tmp = 0 if x <= -7.2e+150: tmp = t_2 elif x <= 4.3e-234: tmp = a * 120.0 elif x <= 2.75e-157: tmp = t_1 elif x <= 2.1e-112: tmp = a * 120.0 elif x <= 1.25e-91: tmp = t_1 elif x <= 1.85e+93: tmp = a * 120.0 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) t_2 = Float64(60.0 * Float64(x / Float64(z - t))) tmp = 0.0 if (x <= -7.2e+150) tmp = t_2; elseif (x <= 4.3e-234) tmp = Float64(a * 120.0); elseif (x <= 2.75e-157) tmp = t_1; elseif (x <= 2.1e-112) tmp = Float64(a * 120.0); elseif (x <= 1.25e-91) tmp = t_1; elseif (x <= 1.85e+93) tmp = Float64(a * 120.0); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); t_2 = 60.0 * (x / (z - t)); tmp = 0.0; if (x <= -7.2e+150) tmp = t_2; elseif (x <= 4.3e-234) tmp = a * 120.0; elseif (x <= 2.75e-157) tmp = t_1; elseif (x <= 2.1e-112) tmp = a * 120.0; elseif (x <= 1.25e-91) tmp = t_1; elseif (x <= 1.85e+93) tmp = a * 120.0; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.2e+150], t$95$2, If[LessEqual[x, 4.3e-234], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, 2.75e-157], t$95$1, If[LessEqual[x, 2.1e-112], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, 1.25e-91], t$95$1, If[LessEqual[x, 1.85e+93], N[(a * 120.0), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
t_2 := 60 \cdot \frac{x}{z - t}\\
\mathbf{if}\;x \leq -7.2 \cdot 10^{+150}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 4.3 \cdot 10^{-234}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x \leq 2.75 \cdot 10^{-157}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-112}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{-91}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+93}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -7.19999999999999972e150 or 1.84999999999999994e93 < x Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 82.1%
Taylor expanded in x around inf 73.5%
if -7.19999999999999972e150 < x < 4.3000000000000001e-234 or 2.7499999999999999e-157 < x < 2.1000000000000001e-112 or 1.24999999999999999e-91 < x < 1.84999999999999994e93Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 61.7%
if 4.3000000000000001e-234 < x < 2.7499999999999999e-157 or 2.1000000000000001e-112 < x < 1.24999999999999999e-91Initial program 99.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 100.0%
*-commutative100.0%
associate-*l/99.9%
metadata-eval99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-out99.9%
associate-*r/99.9%
associate-*r/99.9%
associate-*l/99.9%
*-commutative99.9%
+-commutative99.9%
distribute-rgt-out99.9%
sub-neg99.9%
associate-*l/99.9%
/-rgt-identity99.9%
*-commutative99.9%
associate-/l*99.9%
metadata-eval99.9%
associate-/r*99.6%
*-commutative99.6%
Simplified99.6%
*-un-lft-identity99.6%
times-frac99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 70.1%
associate-*r/70.0%
associate-/l*69.9%
Simplified69.9%
Taylor expanded in x around 0 70.1%
Final simplification65.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= (- z t) -1e+80) (not (<= (- z t) 5e+18))) (+ (* x (/ 60.0 (- z t))) (* a 120.0)) (/ (- x y) (* (- z t) 0.016666666666666666))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((z - t) <= -1e+80) || !((z - t) <= 5e+18)) {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
} else {
tmp = (x - y) / ((z - t) * 0.016666666666666666);
}
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+80)) .or. (.not. ((z - t) <= 5d+18))) then
tmp = (x * (60.0d0 / (z - t))) + (a * 120.0d0)
else
tmp = (x - y) / ((z - t) * 0.016666666666666666d0)
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+80) || !((z - t) <= 5e+18)) {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
} else {
tmp = (x - y) / ((z - t) * 0.016666666666666666);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((z - t) <= -1e+80) or not ((z - t) <= 5e+18): tmp = (x * (60.0 / (z - t))) + (a * 120.0) else: tmp = (x - y) / ((z - t) * 0.016666666666666666) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(z - t) <= -1e+80) || !(Float64(z - t) <= 5e+18)) tmp = Float64(Float64(x * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0)); else tmp = Float64(Float64(x - y) / Float64(Float64(z - t) * 0.016666666666666666)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((z - t) <= -1e+80) || ~(((z - t) <= 5e+18))) tmp = (x * (60.0 / (z - t))) + (a * 120.0); else tmp = (x - y) / ((z - t) * 0.016666666666666666); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(z - t), $MachinePrecision], -1e+80], N[Not[LessEqual[N[(z - t), $MachinePrecision], 5e+18]], $MachinePrecision]], N[(N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -1 \cdot 10^{+80} \lor \neg \left(z - t \leq 5 \cdot 10^{+18}\right):\\
\;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666}\\
\end{array}
\end{array}
if (-.f64 z t) < -1e80 or 5e18 < (-.f64 z t) Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 81.2%
associate-*r/81.2%
associate-*l/81.2%
*-commutative81.2%
Simplified81.2%
if -1e80 < (-.f64 z t) < 5e18Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 97.7%
*-commutative97.7%
associate-*l/97.6%
metadata-eval97.6%
distribute-rgt-neg-in97.6%
distribute-lft-neg-out97.6%
associate-*r/97.6%
associate-*r/97.7%
associate-*l/97.6%
*-commutative97.6%
+-commutative97.6%
distribute-rgt-out99.8%
sub-neg99.8%
associate-*l/99.8%
/-rgt-identity99.8%
*-commutative99.8%
associate-/l*99.8%
metadata-eval99.8%
associate-/r*99.8%
*-commutative99.8%
Simplified99.8%
*-un-lft-identity99.8%
times-frac99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 81.8%
associate-*r/81.7%
associate-/l*81.8%
Simplified81.8%
Taylor expanded in x around 0 79.6%
*-commutative97.7%
associate-*l/97.6%
metadata-eval97.6%
distribute-rgt-neg-in97.6%
distribute-lft-neg-out97.6%
associate-*r/97.6%
associate-*r/97.7%
associate-*l/97.6%
*-commutative97.6%
+-commutative97.6%
distribute-rgt-out99.8%
sub-neg99.8%
associate-*l/99.8%
/-rgt-identity99.8%
*-commutative99.8%
associate-/l*99.8%
metadata-eval99.8%
associate-/r*99.8%
*-commutative99.8%
Simplified81.8%
Final simplification81.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6900000000.0)
(* a 120.0)
(if (<= t -1.45e-66)
(/ (* 60.0 x) (- z t))
(if (<= t -4.5e-127)
(* a 120.0)
(if (<= t 5.8e-119)
(* 60.0 (/ (- x y) z))
(if (<= t 7e+70) (/ 60.0 (/ (- t) (- x y))) (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6900000000.0) {
tmp = a * 120.0;
} else if (t <= -1.45e-66) {
tmp = (60.0 * x) / (z - t);
} else if (t <= -4.5e-127) {
tmp = a * 120.0;
} else if (t <= 5.8e-119) {
tmp = 60.0 * ((x - y) / z);
} else if (t <= 7e+70) {
tmp = 60.0 / (-t / (x - y));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-6900000000.0d0)) then
tmp = a * 120.0d0
else if (t <= (-1.45d-66)) then
tmp = (60.0d0 * x) / (z - t)
else if (t <= (-4.5d-127)) then
tmp = a * 120.0d0
else if (t <= 5.8d-119) then
tmp = 60.0d0 * ((x - y) / z)
else if (t <= 7d+70) then
tmp = 60.0d0 / (-t / (x - y))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6900000000.0) {
tmp = a * 120.0;
} else if (t <= -1.45e-66) {
tmp = (60.0 * x) / (z - t);
} else if (t <= -4.5e-127) {
tmp = a * 120.0;
} else if (t <= 5.8e-119) {
tmp = 60.0 * ((x - y) / z);
} else if (t <= 7e+70) {
tmp = 60.0 / (-t / (x - y));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6900000000.0: tmp = a * 120.0 elif t <= -1.45e-66: tmp = (60.0 * x) / (z - t) elif t <= -4.5e-127: tmp = a * 120.0 elif t <= 5.8e-119: tmp = 60.0 * ((x - y) / z) elif t <= 7e+70: tmp = 60.0 / (-t / (x - y)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6900000000.0) tmp = Float64(a * 120.0); elseif (t <= -1.45e-66) tmp = Float64(Float64(60.0 * x) / Float64(z - t)); elseif (t <= -4.5e-127) tmp = Float64(a * 120.0); elseif (t <= 5.8e-119) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (t <= 7e+70) tmp = Float64(60.0 / Float64(Float64(-t) / Float64(x - y))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6900000000.0) tmp = a * 120.0; elseif (t <= -1.45e-66) tmp = (60.0 * x) / (z - t); elseif (t <= -4.5e-127) tmp = a * 120.0; elseif (t <= 5.8e-119) tmp = 60.0 * ((x - y) / z); elseif (t <= 7e+70) tmp = 60.0 / (-t / (x - y)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6900000000.0], N[(a * 120.0), $MachinePrecision], If[LessEqual[t, -1.45e-66], N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.5e-127], N[(a * 120.0), $MachinePrecision], If[LessEqual[t, 5.8e-119], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+70], N[(60.0 / N[((-t) / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6900000000:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{-66}:\\
\;\;\;\;\frac{60 \cdot x}{z - t}\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-127}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{-119}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+70}:\\
\;\;\;\;\frac{60}{\frac{-t}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if t < -6.9e9 or -1.45000000000000006e-66 < t < -4.4999999999999999e-127 or 7.00000000000000005e70 < t Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.8%
if -6.9e9 < t < -1.45000000000000006e-66Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 83.9%
Taylor expanded in x around inf 59.7%
associate-*r/59.8%
Applied egg-rr59.8%
if -4.4999999999999999e-127 < t < 5.8e-119Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.3%
Taylor expanded in z around inf 70.1%
if 5.8e-119 < t < 7.00000000000000005e70Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 99.8%
*-commutative99.8%
associate-*l/99.8%
metadata-eval99.8%
distribute-rgt-neg-in99.8%
distribute-lft-neg-out99.8%
associate-*r/99.8%
associate-*r/99.7%
associate-*l/99.8%
*-commutative99.8%
+-commutative99.8%
distribute-rgt-out99.8%
sub-neg99.8%
associate-*l/99.7%
/-rgt-identity99.7%
*-commutative99.7%
associate-/l*99.8%
metadata-eval99.8%
associate-/r*99.9%
*-commutative99.9%
Simplified99.9%
*-un-lft-identity99.9%
times-frac99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 64.6%
associate-*r/64.5%
associate-/l*64.6%
Simplified64.6%
Taylor expanded in z around 0 50.7%
neg-mul-150.7%
distribute-neg-frac50.7%
Simplified50.7%
Final simplification64.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) z))))
(if (<= t -1.8e-26)
(* a 120.0)
(if (<= t -4.1e-75)
t_1
(if (<= t -6.3e-127)
(* a 120.0)
(if (<= t 9e-119)
t_1
(if (<= t 9.5e+70) (* -60.0 (/ (- x y) t)) (* a 120.0))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / z);
double tmp;
if (t <= -1.8e-26) {
tmp = a * 120.0;
} else if (t <= -4.1e-75) {
tmp = t_1;
} else if (t <= -6.3e-127) {
tmp = a * 120.0;
} else if (t <= 9e-119) {
tmp = t_1;
} else if (t <= 9.5e+70) {
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) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / z)
if (t <= (-1.8d-26)) then
tmp = a * 120.0d0
else if (t <= (-4.1d-75)) then
tmp = t_1
else if (t <= (-6.3d-127)) then
tmp = a * 120.0d0
else if (t <= 9d-119) then
tmp = t_1
else if (t <= 9.5d+70) 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 t_1 = 60.0 * ((x - y) / z);
double tmp;
if (t <= -1.8e-26) {
tmp = a * 120.0;
} else if (t <= -4.1e-75) {
tmp = t_1;
} else if (t <= -6.3e-127) {
tmp = a * 120.0;
} else if (t <= 9e-119) {
tmp = t_1;
} else if (t <= 9.5e+70) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / z) tmp = 0 if t <= -1.8e-26: tmp = a * 120.0 elif t <= -4.1e-75: tmp = t_1 elif t <= -6.3e-127: tmp = a * 120.0 elif t <= 9e-119: tmp = t_1 elif t <= 9.5e+70: tmp = -60.0 * ((x - y) / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / z)) tmp = 0.0 if (t <= -1.8e-26) tmp = Float64(a * 120.0); elseif (t <= -4.1e-75) tmp = t_1; elseif (t <= -6.3e-127) tmp = Float64(a * 120.0); elseif (t <= 9e-119) tmp = t_1; elseif (t <= 9.5e+70) 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) t_1 = 60.0 * ((x - y) / z); tmp = 0.0; if (t <= -1.8e-26) tmp = a * 120.0; elseif (t <= -4.1e-75) tmp = t_1; elseif (t <= -6.3e-127) tmp = a * 120.0; elseif (t <= 9e-119) tmp = t_1; elseif (t <= 9.5e+70) tmp = -60.0 * ((x - y) / t); 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] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.8e-26], N[(a * 120.0), $MachinePrecision], If[LessEqual[t, -4.1e-75], t$95$1, If[LessEqual[t, -6.3e-127], N[(a * 120.0), $MachinePrecision], If[LessEqual[t, 9e-119], t$95$1, If[LessEqual[t, 9.5e+70], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z}\\
\mathbf{if}\;t \leq -1.8 \cdot 10^{-26}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t \leq -4.1 \cdot 10^{-75}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -6.3 \cdot 10^{-127}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t \leq 9 \cdot 10^{-119}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+70}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if t < -1.8000000000000001e-26 or -4.10000000000000002e-75 < t < -6.2999999999999999e-127 or 9.5000000000000002e70 < t Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.5%
if -1.8000000000000001e-26 < t < -4.10000000000000002e-75 or -6.2999999999999999e-127 < t < 9.0000000000000005e-119Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 79.8%
Taylor expanded in z around inf 69.1%
if 9.0000000000000005e-119 < t < 9.5000000000000002e70Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 99.8%
*-commutative99.8%
associate-*l/99.8%
metadata-eval99.8%
distribute-rgt-neg-in99.8%
distribute-lft-neg-out99.8%
associate-*r/99.8%
associate-*r/99.7%
associate-*l/99.8%
*-commutative99.8%
+-commutative99.8%
distribute-rgt-out99.8%
sub-neg99.8%
associate-*l/99.7%
/-rgt-identity99.7%
*-commutative99.7%
associate-/l*99.8%
metadata-eval99.8%
associate-/r*99.9%
*-commutative99.9%
Simplified99.9%
*-un-lft-identity99.9%
times-frac99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 64.6%
associate-*r/64.5%
associate-/l*64.6%
Simplified64.6%
Taylor expanded in z around 0 50.7%
Final simplification64.8%
(FPCore (x y z t a)
:precision binary64
(if (<= t -7200000.0)
(* a 120.0)
(if (<= t -1.25e-68)
(/ (* 60.0 x) (- z t))
(if (<= t -1.7e-128)
(* a 120.0)
(if (<= t 9.6e-119)
(* 60.0 (/ (- x y) z))
(if (<= t 1.06e+71) (* -60.0 (/ (- x y) t)) (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7200000.0) {
tmp = a * 120.0;
} else if (t <= -1.25e-68) {
tmp = (60.0 * x) / (z - t);
} else if (t <= -1.7e-128) {
tmp = a * 120.0;
} else if (t <= 9.6e-119) {
tmp = 60.0 * ((x - y) / z);
} else if (t <= 1.06e+71) {
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 (t <= (-7200000.0d0)) then
tmp = a * 120.0d0
else if (t <= (-1.25d-68)) then
tmp = (60.0d0 * x) / (z - t)
else if (t <= (-1.7d-128)) then
tmp = a * 120.0d0
else if (t <= 9.6d-119) then
tmp = 60.0d0 * ((x - y) / z)
else if (t <= 1.06d+71) 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 (t <= -7200000.0) {
tmp = a * 120.0;
} else if (t <= -1.25e-68) {
tmp = (60.0 * x) / (z - t);
} else if (t <= -1.7e-128) {
tmp = a * 120.0;
} else if (t <= 9.6e-119) {
tmp = 60.0 * ((x - y) / z);
} else if (t <= 1.06e+71) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -7200000.0: tmp = a * 120.0 elif t <= -1.25e-68: tmp = (60.0 * x) / (z - t) elif t <= -1.7e-128: tmp = a * 120.0 elif t <= 9.6e-119: tmp = 60.0 * ((x - y) / z) elif t <= 1.06e+71: tmp = -60.0 * ((x - y) / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7200000.0) tmp = Float64(a * 120.0); elseif (t <= -1.25e-68) tmp = Float64(Float64(60.0 * x) / Float64(z - t)); elseif (t <= -1.7e-128) tmp = Float64(a * 120.0); elseif (t <= 9.6e-119) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (t <= 1.06e+71) 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 (t <= -7200000.0) tmp = a * 120.0; elseif (t <= -1.25e-68) tmp = (60.0 * x) / (z - t); elseif (t <= -1.7e-128) tmp = a * 120.0; elseif (t <= 9.6e-119) tmp = 60.0 * ((x - y) / z); elseif (t <= 1.06e+71) tmp = -60.0 * ((x - y) / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7200000.0], N[(a * 120.0), $MachinePrecision], If[LessEqual[t, -1.25e-68], N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.7e-128], N[(a * 120.0), $MachinePrecision], If[LessEqual[t, 9.6e-119], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.06e+71], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7200000:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t \leq -1.25 \cdot 10^{-68}:\\
\;\;\;\;\frac{60 \cdot x}{z - t}\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{-128}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{-119}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;t \leq 1.06 \cdot 10^{+71}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if t < -7.2e6 or -1.24999999999999993e-68 < t < -1.69999999999999987e-128 or 1.06e71 < t Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 67.8%
if -7.2e6 < t < -1.24999999999999993e-68Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in a around 0 83.9%
Taylor expanded in x around inf 59.7%
associate-*r/59.8%
Applied egg-rr59.8%
if -1.69999999999999987e-128 < t < 9.60000000000000034e-119Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 78.3%
Taylor expanded in z around inf 70.1%
if 9.60000000000000034e-119 < t < 1.06e71Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 99.8%
*-commutative99.8%
associate-*l/99.8%
metadata-eval99.8%
distribute-rgt-neg-in99.8%
distribute-lft-neg-out99.8%
associate-*r/99.8%
associate-*r/99.7%
associate-*l/99.8%
*-commutative99.8%
+-commutative99.8%
distribute-rgt-out99.8%
sub-neg99.8%
associate-*l/99.7%
/-rgt-identity99.7%
*-commutative99.7%
associate-/l*99.8%
metadata-eval99.8%
associate-/r*99.9%
*-commutative99.9%
Simplified99.9%
*-un-lft-identity99.9%
times-frac99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 64.6%
associate-*r/64.5%
associate-/l*64.6%
Simplified64.6%
Taylor expanded in z around 0 50.7%
Final simplification64.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e+86)
(+ (* a 120.0) (* 60.0 (/ x z)))
(if (<= (* a 120.0) 1e-30)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (* -60.0 (/ x t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+86) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 1e-30) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (-60.0 * (x / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-5d+86)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
else if ((a * 120.0d0) <= 1d-30) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+86) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 1e-30) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (-60.0 * (x / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e+86: tmp = (a * 120.0) + (60.0 * (x / z)) elif (a * 120.0) <= 1e-30: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (-60.0 * (x / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e+86) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); elseif (Float64(a * 120.0) <= 1e-30) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e+86) tmp = (a * 120.0) + (60.0 * (x / z)); elseif ((a * 120.0) <= 1e-30) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (-60.0 * (x / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+86], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-30], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+86}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-30}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.9999999999999998e86Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in y around 0 96.2%
fma-def96.2%
associate-*r/96.2%
associate-*l/96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in z around inf 87.8%
if -4.9999999999999998e86 < (*.f64 a 120) < 1e-30Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 78.2%
if 1e-30 < (*.f64 a 120) Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in y around 0 83.2%
fma-def83.2%
associate-*r/83.2%
associate-*l/83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in z around 0 75.7%
Final simplification79.3%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e+86)
(+ (* a 120.0) (* 60.0 (/ x z)))
(if (<= (* a 120.0) 1e-30)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (/ x (* t -0.016666666666666666))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+86) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 1e-30) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (x / (t * -0.016666666666666666));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a * 120.0d0) <= (-5d+86)) then
tmp = (a * 120.0d0) + (60.0d0 * (x / z))
else if ((a * 120.0d0) <= 1d-30) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + (x / (t * (-0.016666666666666666d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a * 120.0) <= -5e+86) {
tmp = (a * 120.0) + (60.0 * (x / z));
} else if ((a * 120.0) <= 1e-30) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (x / (t * -0.016666666666666666));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a * 120.0) <= -5e+86: tmp = (a * 120.0) + (60.0 * (x / z)) elif (a * 120.0) <= 1e-30: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (x / (t * -0.016666666666666666)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a * 120.0) <= -5e+86) tmp = Float64(Float64(a * 120.0) + Float64(60.0 * Float64(x / z))); elseif (Float64(a * 120.0) <= 1e-30) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(x / Float64(t * -0.016666666666666666))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a * 120.0) <= -5e+86) tmp = (a * 120.0) + (60.0 * (x / z)); elseif ((a * 120.0) <= 1e-30) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (x / (t * -0.016666666666666666)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e+86], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1e-30], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(x / N[(t * -0.016666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -5 \cdot 10^{+86}:\\
\;\;\;\;a \cdot 120 + 60 \cdot \frac{x}{z}\\
\mathbf{elif}\;a \cdot 120 \leq 10^{-30}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{x}{t \cdot -0.016666666666666666}\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.9999999999999998e86Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in y around 0 96.2%
fma-def96.2%
associate-*r/96.2%
associate-*l/96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in z around inf 87.8%
if -4.9999999999999998e86 < (*.f64 a 120) < 1e-30Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 78.2%
if 1e-30 < (*.f64 a 120) Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around inf 83.2%
associate-*r/83.2%
*-commutative83.2%
associate-/l*83.2%
Simplified83.2%
Taylor expanded in z around 0 75.7%
*-commutative75.7%
Simplified75.7%
Final simplification79.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -2e+69) (not (<= x 1.4e+62))) (+ (* x (/ 60.0 (- z t))) (* a 120.0)) (+ (/ -60.0 (/ (- z t) y)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2e+69) || !(x <= 1.4e+62)) {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
} else {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-2d+69)) .or. (.not. (x <= 1.4d+62))) then
tmp = (x * (60.0d0 / (z - t))) + (a * 120.0d0)
else
tmp = ((-60.0d0) / ((z - t) / y)) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2e+69) || !(x <= 1.4e+62)) {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
} else {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -2e+69) or not (x <= 1.4e+62): tmp = (x * (60.0 / (z - t))) + (a * 120.0) else: tmp = (-60.0 / ((z - t) / y)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -2e+69) || !(x <= 1.4e+62)) tmp = Float64(Float64(x * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0)); else tmp = Float64(Float64(-60.0 / Float64(Float64(z - t) / y)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -2e+69) || ~((x <= 1.4e+62))) tmp = (x * (60.0 / (z - t))) + (a * 120.0); else tmp = (-60.0 / ((z - t) / y)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -2e+69], N[Not[LessEqual[x, 1.4e+62]], $MachinePrecision]], N[(N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+69} \lor \neg \left(x \leq 1.4 \cdot 10^{+62}\right):\\
\;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\
\end{array}
\end{array}
if x < -2.0000000000000001e69 or 1.40000000000000007e62 < x Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 87.8%
associate-*r/87.8%
associate-*l/87.8%
*-commutative87.8%
Simplified87.8%
if -2.0000000000000001e69 < x < 1.40000000000000007e62Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 96.8%
associate-*r/96.8%
associate-/l*96.8%
Simplified96.8%
Final simplification92.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -4.4e+68) (not (<= x 2.2e+62))) (+ (/ x (/ (- z t) 60.0)) (* a 120.0)) (+ (/ -60.0 (/ (- z t) y)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -4.4e+68) || !(x <= 2.2e+62)) {
tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
} else {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-4.4d+68)) .or. (.not. (x <= 2.2d+62))) then
tmp = (x / ((z - t) / 60.0d0)) + (a * 120.0d0)
else
tmp = ((-60.0d0) / ((z - t) / y)) + (a * 120.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -4.4e+68) || !(x <= 2.2e+62)) {
tmp = (x / ((z - t) / 60.0)) + (a * 120.0);
} else {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -4.4e+68) or not (x <= 2.2e+62): tmp = (x / ((z - t) / 60.0)) + (a * 120.0) else: tmp = (-60.0 / ((z - t) / y)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -4.4e+68) || !(x <= 2.2e+62)) tmp = Float64(Float64(x / Float64(Float64(z - t) / 60.0)) + Float64(a * 120.0)); else tmp = Float64(Float64(-60.0 / Float64(Float64(z - t) / y)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -4.4e+68) || ~((x <= 2.2e+62))) tmp = (x / ((z - t) / 60.0)) + (a * 120.0); else tmp = (-60.0 / ((z - t) / y)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -4.4e+68], N[Not[LessEqual[x, 2.2e+62]], $MachinePrecision]], N[(N[(x / N[(N[(z - t), $MachinePrecision] / 60.0), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{+68} \lor \neg \left(x \leq 2.2 \cdot 10^{+62}\right):\\
\;\;\;\;\frac{x}{\frac{z - t}{60}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\
\end{array}
\end{array}
if x < -4.39999999999999974e68 or 2.20000000000000015e62 < x Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around inf 87.8%
associate-*r/87.8%
*-commutative87.8%
associate-/l*87.9%
Simplified87.9%
if -4.39999999999999974e68 < x < 2.20000000000000015e62Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 96.8%
associate-*r/96.8%
associate-/l*96.8%
Simplified96.8%
Final simplification93.0%
(FPCore (x y z t a) :precision binary64 (if (<= (- z t) -1e+80) (* a 120.0) (if (<= (- z t) 1e-29) (* -60.0 (/ (- x y) t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z - t) <= -1e+80) {
tmp = a * 120.0;
} else if ((z - t) <= 1e-29) {
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 ((z - t) <= (-1d+80)) then
tmp = a * 120.0d0
else if ((z - t) <= 1d-29) 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 ((z - t) <= -1e+80) {
tmp = a * 120.0;
} else if ((z - t) <= 1e-29) {
tmp = -60.0 * ((x - y) / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z - t) <= -1e+80: tmp = a * 120.0 elif (z - t) <= 1e-29: tmp = -60.0 * ((x - y) / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(z - t) <= -1e+80) tmp = Float64(a * 120.0); elseif (Float64(z - t) <= 1e-29) 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 ((z - t) <= -1e+80) tmp = a * 120.0; elseif ((z - t) <= 1e-29) tmp = -60.0 * ((x - y) / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(z - t), $MachinePrecision], -1e+80], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(z - t), $MachinePrecision], 1e-29], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z - t \leq -1 \cdot 10^{+80}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;z - t \leq 10^{-29}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (-.f64 z t) < -1e80 or 9.99999999999999943e-30 < (-.f64 z t) Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 60.5%
if -1e80 < (-.f64 z t) < 9.99999999999999943e-30Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 97.5%
*-commutative97.5%
associate-*l/97.4%
metadata-eval97.4%
distribute-rgt-neg-in97.4%
distribute-lft-neg-out97.4%
associate-*r/97.4%
associate-*r/97.4%
associate-*l/97.4%
*-commutative97.4%
+-commutative97.4%
distribute-rgt-out99.8%
sub-neg99.8%
associate-*l/99.8%
/-rgt-identity99.8%
*-commutative99.8%
associate-/l*99.8%
metadata-eval99.8%
associate-/r*99.9%
*-commutative99.9%
Simplified99.9%
*-un-lft-identity99.9%
times-frac99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 83.5%
associate-*r/83.5%
associate-/l*83.5%
Simplified83.5%
Taylor expanded in z around 0 58.9%
Final simplification60.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.1e+83) (* a 120.0) (if (<= a 4.1e+45) (* 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 <= -2.1e+83) {
tmp = a * 120.0;
} else if (a <= 4.1e+45) {
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 <= (-2.1d+83)) then
tmp = a * 120.0d0
else if (a <= 4.1d+45) 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 <= -2.1e+83) {
tmp = a * 120.0;
} else if (a <= 4.1e+45) {
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 <= -2.1e+83: tmp = a * 120.0 elif a <= 4.1e+45: 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 <= -2.1e+83) tmp = Float64(a * 120.0); elseif (a <= 4.1e+45) 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 <= -2.1e+83) tmp = a * 120.0; elseif (a <= 4.1e+45) 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, -2.1e+83], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 4.1e+45], 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 -2.1 \cdot 10^{+83}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 4.1 \cdot 10^{+45}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.10000000000000002e83 or 4.10000000000000012e45 < a Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 80.1%
if -2.10000000000000002e83 < a < 4.10000000000000012e45Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 75.9%
Final simplification77.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.45e+83)
(* a 120.0)
(if (<= a 5.6e-30)
(* 60.0 (/ (- x y) (- z t)))
(+ (* a 120.0) (* -60.0 (/ x t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.45e+83) {
tmp = a * 120.0;
} else if (a <= 5.6e-30) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (-60.0 * (x / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.45d+83)) then
tmp = a * 120.0d0
else if (a <= 5.6d-30) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = (a * 120.0d0) + ((-60.0d0) * (x / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.45e+83) {
tmp = a * 120.0;
} else if (a <= 5.6e-30) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (a * 120.0) + (-60.0 * (x / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.45e+83: tmp = a * 120.0 elif a <= 5.6e-30: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (a * 120.0) + (-60.0 * (x / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.45e+83) tmp = Float64(a * 120.0); elseif (a <= 5.6e-30) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(x / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.45e+83) tmp = a * 120.0; elseif (a <= 5.6e-30) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (a * 120.0) + (-60.0 * (x / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.45e+83], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 5.6e-30], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.45 \cdot 10^{+83}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 5.6 \cdot 10^{-30}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{x}{t}\\
\end{array}
\end{array}
if a < -2.44999999999999989e83Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 83.6%
if -2.44999999999999989e83 < a < 5.59999999999999977e-30Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 78.2%
if 5.59999999999999977e-30 < a Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in y around 0 83.2%
fma-def83.2%
associate-*r/83.2%
associate-*l/83.2%
*-commutative83.2%
Simplified83.2%
Taylor expanded in z around 0 75.7%
Final simplification78.6%
(FPCore (x y z t a) :precision binary64 (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
}
def code(x, y, z, t, a): return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60}{\frac{z - t}{x - y}} + a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(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}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (+ (/ (- x y) (* (- z t) 0.016666666666666666)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((x - y) / ((z - t) * 0.016666666666666666)) + (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 = ((x - y) / ((z - t) * 0.016666666666666666d0)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((x - y) / ((z - t) * 0.016666666666666666)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((x - y) / ((z - t) * 0.016666666666666666)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(x - y) / Float64(Float64(z - t) * 0.016666666666666666)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((x - y) / ((z - t) * 0.016666666666666666)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x - y), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] * 0.016666666666666666), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y}{\left(z - t\right) \cdot 0.016666666666666666} + a \cdot 120
\end{array}
Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 99.0%
*-commutative99.0%
associate-*l/99.0%
metadata-eval99.0%
distribute-rgt-neg-in99.0%
distribute-lft-neg-out99.0%
associate-*r/99.0%
associate-*r/99.0%
associate-*l/99.0%
*-commutative99.0%
+-commutative99.0%
distribute-rgt-out99.8%
sub-neg99.8%
associate-*l/99.8%
/-rgt-identity99.8%
*-commutative99.8%
associate-/l*99.8%
metadata-eval99.8%
associate-/r*99.8%
*-commutative99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.9e+79) (* a 120.0) (if (<= a 1.75e-94) (* -60.0 (/ y (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.9e+79) {
tmp = a * 120.0;
} else if (a <= 1.75e-94) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.9d+79)) then
tmp = a * 120.0d0
else if (a <= 1.75d-94) then
tmp = (-60.0d0) * (y / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.9e+79) {
tmp = a * 120.0;
} else if (a <= 1.75e-94) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.9e+79: tmp = a * 120.0 elif a <= 1.75e-94: tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.9e+79) tmp = Float64(a * 120.0); elseif (a <= 1.75e-94) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.9e+79) tmp = a * 120.0; elseif (a <= 1.75e-94) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.9e+79], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 1.75e-94], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{+79}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{-94}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -2.89999999999999992e79 or 1.74999999999999999e-94 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 74.0%
if -2.89999999999999992e79 < a < 1.74999999999999999e-94Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in x around 0 99.0%
*-commutative99.0%
associate-*l/99.0%
metadata-eval99.0%
distribute-rgt-neg-in99.0%
distribute-lft-neg-out99.0%
associate-*r/99.0%
associate-*r/98.9%
associate-*l/98.9%
*-commutative98.9%
+-commutative98.9%
distribute-rgt-out99.7%
sub-neg99.7%
associate-*l/99.6%
/-rgt-identity99.6%
*-commutative99.6%
associate-/l*99.6%
metadata-eval99.6%
associate-/r*99.7%
*-commutative99.7%
Simplified99.7%
*-un-lft-identity99.7%
times-frac99.5%
Applied egg-rr99.5%
Taylor expanded in a around 0 79.1%
associate-*r/79.0%
associate-/l*79.0%
Simplified79.0%
Taylor expanded in x around 0 42.6%
Final simplification57.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.14e+235) (not (<= x 6.5e+142))) (* 60.0 (/ x z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.14e+235) || !(x <= 6.5e+142)) {
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 ((x <= (-1.14d+235)) .or. (.not. (x <= 6.5d+142))) 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 ((x <= -1.14e+235) || !(x <= 6.5e+142)) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.14e+235) or not (x <= 6.5e+142): tmp = 60.0 * (x / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.14e+235) || !(x <= 6.5e+142)) 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 ((x <= -1.14e+235) || ~((x <= 6.5e+142))) tmp = 60.0 * (x / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.14e+235], N[Not[LessEqual[x, 6.5e+142]], $MachinePrecision]], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.14 \cdot 10^{+235} \lor \neg \left(x \leq 6.5 \cdot 10^{+142}\right):\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -1.14000000000000001e235 or 6.4999999999999997e142 < x Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 85.2%
Taylor expanded in x around inf 80.3%
Taylor expanded in z around inf 49.6%
if -1.14000000000000001e235 < x < 6.4999999999999997e142Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 54.8%
Final simplification53.7%
(FPCore (x y z t a) :precision binary64 (if (<= x -4e+237) (* 60.0 (/ (- x) t)) (if (<= x 5.8e+141) (* a 120.0) (* 60.0 (/ x z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4e+237) {
tmp = 60.0 * (-x / t);
} else if (x <= 5.8e+141) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / 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 (x <= (-4d+237)) then
tmp = 60.0d0 * (-x / t)
else if (x <= 5.8d+141) then
tmp = a * 120.0d0
else
tmp = 60.0d0 * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4e+237) {
tmp = 60.0 * (-x / t);
} else if (x <= 5.8e+141) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (x / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4e+237: tmp = 60.0 * (-x / t) elif x <= 5.8e+141: tmp = a * 120.0 else: tmp = 60.0 * (x / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4e+237) tmp = Float64(60.0 * Float64(Float64(-x) / t)); elseif (x <= 5.8e+141) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -4e+237) tmp = 60.0 * (-x / t); elseif (x <= 5.8e+141) tmp = a * 120.0; else tmp = 60.0 * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4e+237], N[(60.0 * N[((-x) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.8e+141], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{+237}:\\
\;\;\;\;60 \cdot \frac{-x}{t}\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{+141}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if x < -3.99999999999999976e237Initial program 99.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in a around 0 87.4%
Taylor expanded in x around inf 87.4%
Taylor expanded in z around 0 69.5%
associate-*r/69.5%
neg-mul-169.5%
Simplified69.5%
if -3.99999999999999976e237 < x < 5.80000000000000013e141Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 54.6%
if 5.80000000000000013e141 < x Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around 0 83.9%
Taylor expanded in x around inf 76.8%
Taylor expanded in z around inf 45.5%
Final simplification54.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 46.6%
Final simplification46.6%
(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 2023208
(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)))