
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (fma (- x y) (/ 60.0 (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return fma((x - y), (60.0 / (z - t)), (a * 120.0));
}
function code(x, y, z, t, a) return fma(Float64(x - y), Float64(60.0 / Float64(z - t)), Float64(a * 120.0)) end
code[x_, y_, z_, t_, a_] := N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x - y, \frac{60}{z - t}, a \cdot 120\right)
\end{array}
Initial program 98.7%
associate-*l/99.8%
*-commutative99.8%
fma-def99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- x y) 60.0) (- z t))))
(if (or (<= t_1 -5.0) (not (<= t_1 10000000.0)))
(* 60.0 (/ (- x y) (- z t)))
(* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - y) * 60.0) / (z - t);
double tmp;
if ((t_1 <= -5.0) || !(t_1 <= 10000000.0)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = ((x - y) * 60.0d0) / (z - t)
if ((t_1 <= (-5.0d0)) .or. (.not. (t_1 <= 10000000.0d0))) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - y) * 60.0) / (z - t);
double tmp;
if ((t_1 <= -5.0) || !(t_1 <= 10000000.0)) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((x - y) * 60.0) / (z - t) tmp = 0 if (t_1 <= -5.0) or not (t_1 <= 10000000.0): tmp = 60.0 * ((x - y) / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t)) tmp = 0.0 if ((t_1 <= -5.0) || !(t_1 <= 10000000.0)) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((x - y) * 60.0) / (z - t); tmp = 0.0; if ((t_1 <= -5.0) || ~((t_1 <= 10000000.0))) tmp = 60.0 * ((x - y) / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5.0], N[Not[LessEqual[t$95$1, 10000000.0]], $MachinePrecision]], 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}
t_1 := \frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{if}\;t_1 \leq -5 \lor \neg \left(t_1 \leq 10000000\right):\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < -5 or 1e7 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) Initial program 97.8%
associate-/l*99.7%
Simplified99.7%
clear-num99.5%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 78.1%
if -5 < (/.f64 (*.f64 60 (-.f64 x y)) (-.f64 z t)) < 1e7Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 81.3%
Final simplification79.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ x (- z t)))))
(if (<= x -1.95e+92)
t_1
(if (<= x 8e-100)
(* a 120.0)
(if (<= x 4.4e-82)
(* -60.0 (/ y (- z t)))
(if (<= x 3.9e+148) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / (z - t));
double tmp;
if (x <= -1.95e+92) {
tmp = t_1;
} else if (x <= 8e-100) {
tmp = a * 120.0;
} else if (x <= 4.4e-82) {
tmp = -60.0 * (y / (z - t));
} else if (x <= 3.9e+148) {
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 / (z - t))
if (x <= (-1.95d+92)) then
tmp = t_1
else if (x <= 8d-100) then
tmp = a * 120.0d0
else if (x <= 4.4d-82) then
tmp = (-60.0d0) * (y / (z - t))
else if (x <= 3.9d+148) 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 / (z - t));
double tmp;
if (x <= -1.95e+92) {
tmp = t_1;
} else if (x <= 8e-100) {
tmp = a * 120.0;
} else if (x <= 4.4e-82) {
tmp = -60.0 * (y / (z - t));
} else if (x <= 3.9e+148) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * (x / (z - t)) tmp = 0 if x <= -1.95e+92: tmp = t_1 elif x <= 8e-100: tmp = a * 120.0 elif x <= 4.4e-82: tmp = -60.0 * (y / (z - t)) elif x <= 3.9e+148: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(x / Float64(z - t))) tmp = 0.0 if (x <= -1.95e+92) tmp = t_1; elseif (x <= 8e-100) tmp = Float64(a * 120.0); elseif (x <= 4.4e-82) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (x <= 3.9e+148) 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 / (z - t)); tmp = 0.0; if (x <= -1.95e+92) tmp = t_1; elseif (x <= 8e-100) tmp = a * 120.0; elseif (x <= 4.4e-82) tmp = -60.0 * (y / (z - t)); elseif (x <= 3.9e+148) 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[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.95e+92], t$95$1, If[LessEqual[x, 8e-100], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, 4.4e-82], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.9e+148], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x}{z - t}\\
\mathbf{if}\;x \leq -1.95 \cdot 10^{+92}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-100}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{-82}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{+148}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -1.95000000000000006e92 or 3.90000000000000002e148 < x Initial program 97.6%
associate-/l*99.7%
Simplified99.7%
clear-num99.5%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 78.4%
Taylor expanded in x around inf 71.7%
if -1.95000000000000006e92 < x < 8.0000000000000002e-100 or 4.39999999999999971e-82 < x < 3.90000000000000002e148Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 65.9%
if 8.0000000000000002e-100 < x < 4.39999999999999971e-82Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
clear-num99.5%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 99.5%
associate-*r/100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 99.5%
Final simplification68.7%
(FPCore (x y z t a)
:precision binary64
(if (<= x -1.32e+94)
(* 60.0 (/ x (- z t)))
(if (<= x 4.8e-100)
(* a 120.0)
(if (<= x 5.5e-82)
(* -60.0 (/ y (- z t)))
(if (<= x 4.2e+140) (* a 120.0) (/ 60.0 (/ (- z t) x)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.32e+94) {
tmp = 60.0 * (x / (z - t));
} else if (x <= 4.8e-100) {
tmp = a * 120.0;
} else if (x <= 5.5e-82) {
tmp = -60.0 * (y / (z - t));
} else if (x <= 4.2e+140) {
tmp = a * 120.0;
} else {
tmp = 60.0 / ((z - t) / x);
}
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.32d+94)) then
tmp = 60.0d0 * (x / (z - t))
else if (x <= 4.8d-100) then
tmp = a * 120.0d0
else if (x <= 5.5d-82) then
tmp = (-60.0d0) * (y / (z - t))
else if (x <= 4.2d+140) then
tmp = a * 120.0d0
else
tmp = 60.0d0 / ((z - t) / x)
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.32e+94) {
tmp = 60.0 * (x / (z - t));
} else if (x <= 4.8e-100) {
tmp = a * 120.0;
} else if (x <= 5.5e-82) {
tmp = -60.0 * (y / (z - t));
} else if (x <= 4.2e+140) {
tmp = a * 120.0;
} else {
tmp = 60.0 / ((z - t) / x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.32e+94: tmp = 60.0 * (x / (z - t)) elif x <= 4.8e-100: tmp = a * 120.0 elif x <= 5.5e-82: tmp = -60.0 * (y / (z - t)) elif x <= 4.2e+140: tmp = a * 120.0 else: tmp = 60.0 / ((z - t) / x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.32e+94) tmp = Float64(60.0 * Float64(x / Float64(z - t))); elseif (x <= 4.8e-100) tmp = Float64(a * 120.0); elseif (x <= 5.5e-82) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (x <= 4.2e+140) tmp = Float64(a * 120.0); else tmp = Float64(60.0 / Float64(Float64(z - t) / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.32e+94) tmp = 60.0 * (x / (z - t)); elseif (x <= 4.8e-100) tmp = a * 120.0; elseif (x <= 5.5e-82) tmp = -60.0 * (y / (z - t)); elseif (x <= 4.2e+140) tmp = a * 120.0; else tmp = 60.0 / ((z - t) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.32e+94], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.8e-100], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, 5.5e-82], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.2e+140], N[(a * 120.0), $MachinePrecision], N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.32 \cdot 10^{+94}:\\
\;\;\;\;60 \cdot \frac{x}{z - t}\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-100}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{-82}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{+140}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x}}\\
\end{array}
\end{array}
if x < -1.32000000000000003e94Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
clear-num99.4%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 73.5%
Taylor expanded in x around inf 65.9%
if -1.32000000000000003e94 < x < 4.8000000000000005e-100 or 5.4999999999999998e-82 < x < 4.2000000000000004e140Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 65.9%
if 4.8000000000000005e-100 < x < 5.4999999999999998e-82Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
clear-num99.5%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 99.5%
associate-*r/100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 99.5%
if 4.2000000000000004e140 < x Initial program 94.8%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 84.8%
Taylor expanded in x around inf 79.2%
clear-num79.1%
div-inv79.2%
Applied egg-rr79.2%
Final simplification68.7%
(FPCore (x y z t a)
:precision binary64
(if (<= x -1.05e+93)
(/ (* x 60.0) (- z t))
(if (<= x 8e-100)
(* a 120.0)
(if (<= x 4.6e-82)
(* -60.0 (/ y (- z t)))
(if (<= x 1.86e+140) (* a 120.0) (/ 60.0 (/ (- z t) x)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.05e+93) {
tmp = (x * 60.0) / (z - t);
} else if (x <= 8e-100) {
tmp = a * 120.0;
} else if (x <= 4.6e-82) {
tmp = -60.0 * (y / (z - t));
} else if (x <= 1.86e+140) {
tmp = a * 120.0;
} else {
tmp = 60.0 / ((z - t) / x);
}
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.05d+93)) then
tmp = (x * 60.0d0) / (z - t)
else if (x <= 8d-100) then
tmp = a * 120.0d0
else if (x <= 4.6d-82) then
tmp = (-60.0d0) * (y / (z - t))
else if (x <= 1.86d+140) then
tmp = a * 120.0d0
else
tmp = 60.0d0 / ((z - t) / x)
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.05e+93) {
tmp = (x * 60.0) / (z - t);
} else if (x <= 8e-100) {
tmp = a * 120.0;
} else if (x <= 4.6e-82) {
tmp = -60.0 * (y / (z - t));
} else if (x <= 1.86e+140) {
tmp = a * 120.0;
} else {
tmp = 60.0 / ((z - t) / x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.05e+93: tmp = (x * 60.0) / (z - t) elif x <= 8e-100: tmp = a * 120.0 elif x <= 4.6e-82: tmp = -60.0 * (y / (z - t)) elif x <= 1.86e+140: tmp = a * 120.0 else: tmp = 60.0 / ((z - t) / x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.05e+93) tmp = Float64(Float64(x * 60.0) / Float64(z - t)); elseif (x <= 8e-100) tmp = Float64(a * 120.0); elseif (x <= 4.6e-82) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (x <= 1.86e+140) tmp = Float64(a * 120.0); else tmp = Float64(60.0 / Float64(Float64(z - t) / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.05e+93) tmp = (x * 60.0) / (z - t); elseif (x <= 8e-100) tmp = a * 120.0; elseif (x <= 4.6e-82) tmp = -60.0 * (y / (z - t)); elseif (x <= 1.86e+140) tmp = a * 120.0; else tmp = 60.0 / ((z - t) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.05e+93], N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8e-100], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, 4.6e-82], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.86e+140], N[(a * 120.0), $MachinePrecision], N[(60.0 / N[(N[(z - t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.05 \cdot 10^{+93}:\\
\;\;\;\;\frac{x \cdot 60}{z - t}\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-100}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{-82}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;x \leq 1.86 \cdot 10^{+140}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{\frac{z - t}{x}}\\
\end{array}
\end{array}
if x < -1.0499999999999999e93Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
clear-num99.4%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 73.5%
associate-*r/73.6%
Applied egg-rr73.6%
Taylor expanded in x around inf 65.9%
*-commutative65.9%
Simplified65.9%
if -1.0499999999999999e93 < x < 8.0000000000000002e-100 or 4.59999999999999994e-82 < x < 1.86e140Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 65.9%
if 8.0000000000000002e-100 < x < 4.59999999999999994e-82Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
clear-num99.5%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 99.5%
associate-*r/100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 99.5%
if 1.86e140 < x Initial program 94.8%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 84.8%
Taylor expanded in x around inf 79.2%
clear-num79.1%
div-inv79.2%
Applied egg-rr79.2%
Final simplification68.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -3.6e+78) (not (<= x 1.8e-65))) (+ (* x (/ 60.0 (- z t))) (* a 120.0)) (+ (* a 120.0) (* -60.0 (/ y (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -3.6e+78) || !(x <= 1.8e-65)) {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
} else {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-3.6d+78)) .or. (.not. (x <= 1.8d-65))) then
tmp = (x * (60.0d0 / (z - t))) + (a * 120.0d0)
else
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -3.6e+78) || !(x <= 1.8e-65)) {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
} else {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -3.6e+78) or not (x <= 1.8e-65): tmp = (x * (60.0 / (z - t))) + (a * 120.0) else: tmp = (a * 120.0) + (-60.0 * (y / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -3.6e+78) || !(x <= 1.8e-65)) tmp = Float64(Float64(x * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0)); else tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -3.6e+78) || ~((x <= 1.8e-65))) tmp = (x * (60.0 / (z - t))) + (a * 120.0); else tmp = (a * 120.0) + (-60.0 * (y / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -3.6e+78], N[Not[LessEqual[x, 1.8e-65]], $MachinePrecision]], N[(N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{+78} \lor \neg \left(x \leq 1.8 \cdot 10^{-65}\right):\\
\;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\end{array}
\end{array}
if x < -3.6000000000000002e78 or 1.7999999999999999e-65 < x Initial program 98.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 91.1%
associate-*r/90.5%
associate-*l/91.2%
*-commutative91.2%
Simplified91.2%
if -3.6000000000000002e78 < x < 1.7999999999999999e-65Initial program 99.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 95.5%
Final simplification93.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -4e+77) (not (<= x 2e-65))) (+ (* 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 <= -4e+77) || !(x <= 2e-65)) {
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 <= (-4d+77)) .or. (.not. (x <= 2d-65))) 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 <= -4e+77) || !(x <= 2e-65)) {
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 <= -4e+77) or not (x <= 2e-65): 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 <= -4e+77) || !(x <= 2e-65)) 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 <= -4e+77) || ~((x <= 2e-65))) 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, -4e+77], N[Not[LessEqual[x, 2e-65]], $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 -4 \cdot 10^{+77} \lor \neg \left(x \leq 2 \cdot 10^{-65}\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 < -3.99999999999999993e77 or 1.99999999999999985e-65 < x Initial program 98.3%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around inf 91.1%
associate-*r/90.5%
associate-*l/91.2%
*-commutative91.2%
Simplified91.2%
if -3.99999999999999993e77 < x < 1.99999999999999985e-65Initial program 99.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 95.5%
associate-*r/94.8%
associate-/l*95.6%
Simplified95.6%
Final simplification93.4%
(FPCore (x y z t a)
:precision binary64
(if (<= x -5e+90)
(/ (* (- x y) 60.0) (- z t))
(if (<= x 2.75e+147)
(+ (* a 120.0) (* -60.0 (/ y (- z t))))
(* 60.0 (/ (- x y) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5e+90) {
tmp = ((x - y) * 60.0) / (z - t);
} else if (x <= 2.75e+147) {
tmp = (a * 120.0) + (-60.0 * (y / (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) :: tmp
if (x <= (-5d+90)) then
tmp = ((x - y) * 60.0d0) / (z - t)
else if (x <= 2.75d+147) then
tmp = (a * 120.0d0) + ((-60.0d0) * (y / (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 tmp;
if (x <= -5e+90) {
tmp = ((x - y) * 60.0) / (z - t);
} else if (x <= 2.75e+147) {
tmp = (a * 120.0) + (-60.0 * (y / (z - t)));
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -5e+90: tmp = ((x - y) * 60.0) / (z - t) elif x <= 2.75e+147: tmp = (a * 120.0) + (-60.0 * (y / (z - t))) else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -5e+90) tmp = Float64(Float64(Float64(x - y) * 60.0) / Float64(z - t)); elseif (x <= 2.75e+147) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 * Float64(y / 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) tmp = 0.0; if (x <= -5e+90) tmp = ((x - y) * 60.0) / (z - t); elseif (x <= 2.75e+147) tmp = (a * 120.0) + (-60.0 * (y / (z - t))); else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -5e+90], N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.75e+147], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 * N[(y / 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}
\mathbf{if}\;x \leq -5 \cdot 10^{+90}:\\
\;\;\;\;\frac{\left(x - y\right) \cdot 60}{z - t}\\
\mathbf{elif}\;x \leq 2.75 \cdot 10^{+147}:\\
\;\;\;\;a \cdot 120 + -60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if x < -5.0000000000000004e90Initial program 99.8%
associate-/l*99.6%
Simplified99.6%
clear-num99.4%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 73.5%
associate-*r/73.6%
Applied egg-rr73.6%
if -5.0000000000000004e90 < x < 2.7499999999999999e147Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 91.3%
if 2.7499999999999999e147 < x Initial program 94.8%
associate-/l*99.7%
Simplified99.7%
clear-num99.6%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 84.8%
Final simplification86.7%
(FPCore (x y z t a)
:precision binary64
(if (<= x -4.6e+77)
(+ (/ (* x 60.0) (- z t)) (* a 120.0))
(if (<= x 2e-65)
(+ (/ -60.0 (/ (- z t) y)) (* a 120.0))
(+ (* x (/ 60.0 (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -4.6e+77) {
tmp = ((x * 60.0) / (z - t)) + (a * 120.0);
} else if (x <= 2e-65) {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
} else {
tmp = (x * (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 (x <= (-4.6d+77)) then
tmp = ((x * 60.0d0) / (z - t)) + (a * 120.0d0)
else if (x <= 2d-65) then
tmp = ((-60.0d0) / ((z - t) / y)) + (a * 120.0d0)
else
tmp = (x * (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 (x <= -4.6e+77) {
tmp = ((x * 60.0) / (z - t)) + (a * 120.0);
} else if (x <= 2e-65) {
tmp = (-60.0 / ((z - t) / y)) + (a * 120.0);
} else {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -4.6e+77: tmp = ((x * 60.0) / (z - t)) + (a * 120.0) elif x <= 2e-65: tmp = (-60.0 / ((z - t) / y)) + (a * 120.0) else: tmp = (x * (60.0 / (z - t))) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -4.6e+77) tmp = Float64(Float64(Float64(x * 60.0) / Float64(z - t)) + Float64(a * 120.0)); elseif (x <= 2e-65) tmp = Float64(Float64(-60.0 / Float64(Float64(z - t) / y)) + Float64(a * 120.0)); else tmp = Float64(Float64(x * Float64(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 (x <= -4.6e+77) tmp = ((x * 60.0) / (z - t)) + (a * 120.0); elseif (x <= 2e-65) tmp = (-60.0 / ((z - t) / y)) + (a * 120.0); else tmp = (x * (60.0 / (z - t))) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -4.6e+77], N[(N[(N[(x * 60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e-65], N[(N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.6 \cdot 10^{+77}:\\
\;\;\;\;\frac{x \cdot 60}{z - t} + a \cdot 120\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-65}:\\
\;\;\;\;\frac{-60}{\frac{z - t}{y}} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -4.5999999999999999e77Initial program 99.8%
Taylor expanded in x around inf 92.5%
*-commutative64.2%
Simplified92.5%
if -4.5999999999999999e77 < x < 1.99999999999999985e-65Initial program 99.1%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 95.5%
associate-*r/94.8%
associate-/l*95.6%
Simplified95.6%
if 1.99999999999999985e-65 < x Initial program 97.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 90.1%
associate-*r/89.0%
associate-*l/90.2%
*-commutative90.2%
Simplified90.2%
Final simplification93.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ x z))))
(if (<= x -4.1e+99)
t_1
(if (<= x 4e-93)
(* a 120.0)
(if (<= x 4.4e-82)
(* 60.0 (/ y t))
(if (<= x 1.8e+148) (* a 120.0) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (x / z);
double tmp;
if (x <= -4.1e+99) {
tmp = t_1;
} else if (x <= 4e-93) {
tmp = a * 120.0;
} else if (x <= 4.4e-82) {
tmp = 60.0 * (y / t);
} else if (x <= 1.8e+148) {
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 / z)
if (x <= (-4.1d+99)) then
tmp = t_1
else if (x <= 4d-93) then
tmp = a * 120.0d0
else if (x <= 4.4d-82) then
tmp = 60.0d0 * (y / t)
else if (x <= 1.8d+148) 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 / z);
double tmp;
if (x <= -4.1e+99) {
tmp = t_1;
} else if (x <= 4e-93) {
tmp = a * 120.0;
} else if (x <= 4.4e-82) {
tmp = 60.0 * (y / t);
} else if (x <= 1.8e+148) {
tmp = a * 120.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * (x / z) tmp = 0 if x <= -4.1e+99: tmp = t_1 elif x <= 4e-93: tmp = a * 120.0 elif x <= 4.4e-82: tmp = 60.0 * (y / t) elif x <= 1.8e+148: tmp = a * 120.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(x / z)) tmp = 0.0 if (x <= -4.1e+99) tmp = t_1; elseif (x <= 4e-93) tmp = Float64(a * 120.0); elseif (x <= 4.4e-82) tmp = Float64(60.0 * Float64(y / t)); elseif (x <= 1.8e+148) 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 / z); tmp = 0.0; if (x <= -4.1e+99) tmp = t_1; elseif (x <= 4e-93) tmp = a * 120.0; elseif (x <= 4.4e-82) tmp = 60.0 * (y / t); elseif (x <= 1.8e+148) 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[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.1e+99], t$95$1, If[LessEqual[x, 4e-93], N[(a * 120.0), $MachinePrecision], If[LessEqual[x, 4.4e-82], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.8e+148], N[(a * 120.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x}{z}\\
\mathbf{if}\;x \leq -4.1 \cdot 10^{+99}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4 \cdot 10^{-93}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{-82}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{+148}:\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -4.09999999999999979e99 or 1.80000000000000003e148 < x Initial program 97.6%
associate-/l*99.7%
Simplified99.7%
clear-num99.5%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 77.9%
Taylor expanded in x around inf 71.0%
Taylor expanded in z around inf 40.1%
if -4.09999999999999979e99 < x < 3.9999999999999996e-93 or 4.39999999999999971e-82 < x < 1.80000000000000003e148Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 64.8%
if 3.9999999999999996e-93 < x < 4.39999999999999971e-82Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
clear-num99.7%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 99.7%
Taylor expanded in z around 0 99.7%
associate-*r/99.7%
mul-1-neg99.7%
Simplified99.7%
Taylor expanded in x around 0 99.7%
Final simplification57.0%
(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 98.7%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.8e+237) (not (<= y 3.4e+192))) (* -60.0 (/ y (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.8e+237) || !(y <= 3.4e+192)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.8d+237)) .or. (.not. (y <= 3.4d+192))) then
tmp = (-60.0d0) * (y / (z - t))
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.8e+237) || !(y <= 3.4e+192)) {
tmp = -60.0 * (y / (z - t));
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.8e+237) or not (y <= 3.4e+192): tmp = -60.0 * (y / (z - t)) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.8e+237) || !(y <= 3.4e+192)) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.8e+237) || ~((y <= 3.4e+192))) tmp = -60.0 * (y / (z - t)); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.8e+237], N[Not[LessEqual[y, 3.4e+192]], $MachinePrecision]], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+237} \lor \neg \left(y \leq 3.4 \cdot 10^{+192}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if y < -1.80000000000000007e237 or 3.39999999999999996e192 < y Initial program 95.8%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in a around 0 79.7%
associate-*r/77.7%
Applied egg-rr77.7%
Taylor expanded in x around 0 75.4%
if -1.80000000000000007e237 < y < 3.39999999999999996e192Initial program 99.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 55.3%
Final simplification59.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -9.8e-61) (not (<= a 3.7e-131))) (* a 120.0) (* 60.0 (/ (- x) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -9.8e-61) || !(a <= 3.7e-131)) {
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 <= (-9.8d-61)) .or. (.not. (a <= 3.7d-131))) 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 <= -9.8e-61) || !(a <= 3.7e-131)) {
tmp = a * 120.0;
} else {
tmp = 60.0 * (-x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -9.8e-61) or not (a <= 3.7e-131): tmp = a * 120.0 else: tmp = 60.0 * (-x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -9.8e-61) || !(a <= 3.7e-131)) tmp = Float64(a * 120.0); else tmp = Float64(60.0 * Float64(Float64(-x) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -9.8e-61) || ~((a <= 3.7e-131))) 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, -9.8e-61], N[Not[LessEqual[a, 3.7e-131]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(60.0 * N[((-x) / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.8 \cdot 10^{-61} \lor \neg \left(a \leq 3.7 \cdot 10^{-131}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{-x}{t}\\
\end{array}
\end{array}
if a < -9.80000000000000004e-61 or 3.7000000000000002e-131 < a Initial program 98.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 67.9%
if -9.80000000000000004e-61 < a < 3.7000000000000002e-131Initial program 98.6%
associate-/l*99.6%
Simplified99.6%
clear-num99.5%
associate-/r/99.6%
Applied egg-rr99.6%
Taylor expanded in a around 0 87.3%
Taylor expanded in x around inf 50.5%
Taylor expanded in z around 0 30.2%
associate-*r/30.2%
neg-mul-130.2%
Simplified30.2%
Final simplification54.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -4.5e+99) (not (<= x 4.2e+151))) (* 60.0 (/ x z)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -4.5e+99) || !(x <= 4.2e+151)) {
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 <= (-4.5d+99)) .or. (.not. (x <= 4.2d+151))) 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 <= -4.5e+99) || !(x <= 4.2e+151)) {
tmp = 60.0 * (x / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -4.5e+99) or not (x <= 4.2e+151): tmp = 60.0 * (x / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -4.5e+99) || !(x <= 4.2e+151)) 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 <= -4.5e+99) || ~((x <= 4.2e+151))) 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, -4.5e+99], N[Not[LessEqual[x, 4.2e+151]], $MachinePrecision]], N[(60.0 * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{+99} \lor \neg \left(x \leq 4.2 \cdot 10^{+151}\right):\\
\;\;\;\;60 \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if x < -4.5e99 or 4.2000000000000001e151 < x Initial program 97.6%
associate-/l*99.7%
Simplified99.7%
clear-num99.5%
associate-/r/99.7%
Applied egg-rr99.7%
Taylor expanded in a around 0 77.9%
Taylor expanded in x around inf 71.0%
Taylor expanded in z around inf 40.1%
if -4.5e99 < x < 4.2000000000000001e151Initial program 99.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 63.0%
Final simplification55.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 98.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 49.2%
Final simplification49.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(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 2023274
(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)))