
(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 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
\end{array}
(FPCore (x y z t a) :precision binary64 (fma a 120.0 (* (- x y) (/ 60.0 (- z t)))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((x - y) * (60.0 / (z - t))));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(x - y) * Float64(60.0 / Float64(z - t)))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(x - y), $MachinePrecision] * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \left(x - y\right) \cdot \frac{60}{z - t}\right)
\end{array}
Initial program 99.0%
+-commutative99.0%
fma-def99.0%
associate-*l/99.8%
*-commutative99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* 60.0 (/ (- x y) (- z t)))))
(if (<= (* a 120.0) -5000000000.0)
(* a 120.0)
(if (<= (* a 120.0) -5e-28)
t_1
(if (<= (* a 120.0) -2e-107)
(* a 120.0)
(if (<= (* a 120.0) 1000000000.0)
t_1
(if (<= (* a 120.0) 5e+70)
(+ (* a 120.0) (/ 60.0 (/ z x)))
(if (<= (* a 120.0) 2e+105) t_1 (* a 120.0)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -5000000000.0) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -5e-28) {
tmp = t_1;
} else if ((a * 120.0) <= -2e-107) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1000000000.0) {
tmp = t_1;
} else if ((a * 120.0) <= 5e+70) {
tmp = (a * 120.0) + (60.0 / (z / x));
} else if ((a * 120.0) <= 2e+105) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = 60.0d0 * ((x - y) / (z - t))
if ((a * 120.0d0) <= (-5000000000.0d0)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= (-5d-28)) then
tmp = t_1
else if ((a * 120.0d0) <= (-2d-107)) then
tmp = a * 120.0d0
else if ((a * 120.0d0) <= 1000000000.0d0) then
tmp = t_1
else if ((a * 120.0d0) <= 5d+70) then
tmp = (a * 120.0d0) + (60.0d0 / (z / x))
else if ((a * 120.0d0) <= 2d+105) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * ((x - y) / (z - t));
double tmp;
if ((a * 120.0) <= -5000000000.0) {
tmp = a * 120.0;
} else if ((a * 120.0) <= -5e-28) {
tmp = t_1;
} else if ((a * 120.0) <= -2e-107) {
tmp = a * 120.0;
} else if ((a * 120.0) <= 1000000000.0) {
tmp = t_1;
} else if ((a * 120.0) <= 5e+70) {
tmp = (a * 120.0) + (60.0 / (z / x));
} else if ((a * 120.0) <= 2e+105) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * ((x - y) / (z - t)) tmp = 0 if (a * 120.0) <= -5000000000.0: tmp = a * 120.0 elif (a * 120.0) <= -5e-28: tmp = t_1 elif (a * 120.0) <= -2e-107: tmp = a * 120.0 elif (a * 120.0) <= 1000000000.0: tmp = t_1 elif (a * 120.0) <= 5e+70: tmp = (a * 120.0) + (60.0 / (z / x)) elif (a * 120.0) <= 2e+105: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))) tmp = 0.0 if (Float64(a * 120.0) <= -5000000000.0) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= -5e-28) tmp = t_1; elseif (Float64(a * 120.0) <= -2e-107) tmp = Float64(a * 120.0); elseif (Float64(a * 120.0) <= 1000000000.0) tmp = t_1; elseif (Float64(a * 120.0) <= 5e+70) tmp = Float64(Float64(a * 120.0) + Float64(60.0 / Float64(z / x))); elseif (Float64(a * 120.0) <= 2e+105) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * ((x - y) / (z - t)); tmp = 0.0; if ((a * 120.0) <= -5000000000.0) tmp = a * 120.0; elseif ((a * 120.0) <= -5e-28) tmp = t_1; elseif ((a * 120.0) <= -2e-107) tmp = a * 120.0; elseif ((a * 120.0) <= 1000000000.0) tmp = t_1; elseif ((a * 120.0) <= 5e+70) tmp = (a * 120.0) + (60.0 / (z / x)); elseif ((a * 120.0) <= 2e+105) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 120.0), $MachinePrecision], -5000000000.0], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-28], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-107], N[(a * 120.0), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 1000000000.0], t$95$1, If[LessEqual[N[(a * 120.0), $MachinePrecision], 5e+70], N[(N[(a * 120.0), $MachinePrecision] + N[(60.0 / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 120.0), $MachinePrecision], 2e+105], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 60 \cdot \frac{x - y}{z - t}\\
\mathbf{if}\;a \cdot 120 \leq -5000000000:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-107}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq 1000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 120 \leq 5 \cdot 10^{+70}:\\
\;\;\;\;a \cdot 120 + \frac{60}{\frac{z}{x}}\\
\mathbf{elif}\;a \cdot 120 \leq 2 \cdot 10^{+105}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -5e9 or -5.0000000000000002e-28 < (*.f64 a 120) < -2e-107 or 1.9999999999999999e105 < (*.f64 a 120) Initial program 98.3%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 84.7%
if -5e9 < (*.f64 a 120) < -5.0000000000000002e-28 or -2e-107 < (*.f64 a 120) < 1e9 or 5.0000000000000002e70 < (*.f64 a 120) < 1.9999999999999999e105Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 84.5%
if 1e9 < (*.f64 a 120) < 5.0000000000000002e70Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 90.1%
Taylor expanded in z around inf 80.7%
Final simplification84.4%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5000000000.0)
(* a 120.0)
(if (or (<= (* a 120.0) -5e-28)
(and (not (<= (* a 120.0) -2e-107)) (<= (* a 120.0) 1e+41)))
(* 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 * 120.0) <= -5000000000.0) {
tmp = a * 120.0;
} else if (((a * 120.0) <= -5e-28) || (!((a * 120.0) <= -2e-107) && ((a * 120.0) <= 1e+41))) {
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 * 120.0d0) <= (-5000000000.0d0)) then
tmp = a * 120.0d0
else if (((a * 120.0d0) <= (-5d-28)) .or. (.not. ((a * 120.0d0) <= (-2d-107))) .and. ((a * 120.0d0) <= 1d+41)) 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 * 120.0) <= -5000000000.0) {
tmp = a * 120.0;
} else if (((a * 120.0) <= -5e-28) || (!((a * 120.0) <= -2e-107) && ((a * 120.0) <= 1e+41))) {
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 * 120.0) <= -5000000000.0: tmp = a * 120.0 elif ((a * 120.0) <= -5e-28) or (not ((a * 120.0) <= -2e-107) and ((a * 120.0) <= 1e+41)): 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 (Float64(a * 120.0) <= -5000000000.0) tmp = Float64(a * 120.0); elseif ((Float64(a * 120.0) <= -5e-28) || (!(Float64(a * 120.0) <= -2e-107) && (Float64(a * 120.0) <= 1e+41))) 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 * 120.0) <= -5000000000.0) tmp = a * 120.0; elseif (((a * 120.0) <= -5e-28) || (~(((a * 120.0) <= -2e-107)) && ((a * 120.0) <= 1e+41))) 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[N[(a * 120.0), $MachinePrecision], -5000000000.0], N[(a * 120.0), $MachinePrecision], If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -5e-28], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-107]], $MachinePrecision], LessEqual[N[(a * 120.0), $MachinePrecision], 1e+41]]], 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 \cdot 120 \leq -5000000000:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -5 \cdot 10^{-28} \lor \neg \left(a \cdot 120 \leq -2 \cdot 10^{-107}\right) \land a \cdot 120 \leq 10^{+41}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -5e9 or -5.0000000000000002e-28 < (*.f64 a 120) < -2e-107 or 1.00000000000000001e41 < (*.f64 a 120) Initial program 98.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 82.3%
if -5e9 < (*.f64 a 120) < -5.0000000000000002e-28 or -2e-107 < (*.f64 a 120) < 1.00000000000000001e41Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 83.0%
Final simplification82.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.05e-5) (not (<= y 1.65e+143))) (+ (* -60.0 (/ y (- z t))) (* 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 ((y <= -3.05e-5) || !(y <= 1.65e+143)) {
tmp = (-60.0 * (y / (z - t))) + (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 ((y <= (-3.05d-5)) .or. (.not. (y <= 1.65d+143))) then
tmp = ((-60.0d0) * (y / (z - t))) + (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 ((y <= -3.05e-5) || !(y <= 1.65e+143)) {
tmp = (-60.0 * (y / (z - t))) + (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 (y <= -3.05e-5) or not (y <= 1.65e+143): tmp = (-60.0 * (y / (z - t))) + (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 ((y <= -3.05e-5) || !(y <= 1.65e+143)) tmp = Float64(Float64(-60.0 * Float64(y / Float64(z - t))) + 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 ((y <= -3.05e-5) || ~((y <= 1.65e+143))) tmp = (-60.0 * (y / (z - t))) + (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[Or[LessEqual[y, -3.05e-5], N[Not[LessEqual[y, 1.65e+143]], $MachinePrecision]], N[(N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $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}\;y \leq -3.05 \cdot 10^{-5} \lor \neg \left(y \leq 1.65 \cdot 10^{+143}\right):\\
\;\;\;\;-60 \cdot \frac{y}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if y < -3.04999999999999994e-5 or 1.65e143 < y Initial program 97.6%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 90.8%
if -3.04999999999999994e-5 < y < 1.65e143Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 89.7%
associate-*r/89.7%
associate-*l/89.7%
*-commutative89.7%
Simplified89.7%
Final simplification90.1%
(FPCore (x y z t a)
:precision binary64
(if (<= x -2.5e+215)
(* x (/ 60.0 (- z t)))
(if (<= x -7.8e+139)
(+ (* -60.0 (/ (- x y) t)) (* a 120.0))
(+ (* -60.0 (/ y (- z t))) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.5e+215) {
tmp = x * (60.0 / (z - t));
} else if (x <= -7.8e+139) {
tmp = (-60.0 * ((x - y) / t)) + (a * 120.0);
} else {
tmp = (-60.0 * (y / (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 <= (-2.5d+215)) then
tmp = x * (60.0d0 / (z - t))
else if (x <= (-7.8d+139)) then
tmp = ((-60.0d0) * ((x - y) / t)) + (a * 120.0d0)
else
tmp = ((-60.0d0) * (y / (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 <= -2.5e+215) {
tmp = x * (60.0 / (z - t));
} else if (x <= -7.8e+139) {
tmp = (-60.0 * ((x - y) / t)) + (a * 120.0);
} else {
tmp = (-60.0 * (y / (z - t))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2.5e+215: tmp = x * (60.0 / (z - t)) elif x <= -7.8e+139: tmp = (-60.0 * ((x - y) / t)) + (a * 120.0) else: tmp = (-60.0 * (y / (z - t))) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.5e+215) tmp = Float64(x * Float64(60.0 / Float64(z - t))); elseif (x <= -7.8e+139) tmp = Float64(Float64(-60.0 * Float64(Float64(x - y) / t)) + Float64(a * 120.0)); else tmp = Float64(Float64(-60.0 * Float64(y / 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 <= -2.5e+215) tmp = x * (60.0 / (z - t)); elseif (x <= -7.8e+139) tmp = (-60.0 * ((x - y) / t)) + (a * 120.0); else tmp = (-60.0 * (y / (z - t))) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.5e+215], N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7.8e+139], N[(N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{+215}:\\
\;\;\;\;x \cdot \frac{60}{z - t}\\
\mathbf{elif}\;x \leq -7.8 \cdot 10^{+139}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -2.5000000000000001e215Initial program 99.5%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 99.8%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 93.8%
associate-*r/93.7%
*-commutative93.7%
associate-*r/94.0%
Simplified94.0%
if -2.5000000000000001e215 < x < -7.80000000000000012e139Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around 0 93.6%
if -7.80000000000000012e139 < x Initial program 98.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 83.2%
Final simplification84.6%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.3e-6)
(+ (* -60.0 (/ y (- z t))) (* a 120.0))
(if (<= y 1.05e+145)
(+ (* x (/ 60.0 (- z t))) (* a 120.0))
(+ (/ 60.0 (/ (- t z) y)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.3e-6) {
tmp = (-60.0 * (y / (z - t))) + (a * 120.0);
} else if (y <= 1.05e+145) {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
} else {
tmp = (60.0 / ((t - z) / 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 (y <= (-1.3d-6)) then
tmp = ((-60.0d0) * (y / (z - t))) + (a * 120.0d0)
else if (y <= 1.05d+145) then
tmp = (x * (60.0d0 / (z - t))) + (a * 120.0d0)
else
tmp = (60.0d0 / ((t - z) / 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 (y <= -1.3e-6) {
tmp = (-60.0 * (y / (z - t))) + (a * 120.0);
} else if (y <= 1.05e+145) {
tmp = (x * (60.0 / (z - t))) + (a * 120.0);
} else {
tmp = (60.0 / ((t - z) / y)) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.3e-6: tmp = (-60.0 * (y / (z - t))) + (a * 120.0) elif y <= 1.05e+145: tmp = (x * (60.0 / (z - t))) + (a * 120.0) else: tmp = (60.0 / ((t - z) / y)) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.3e-6) tmp = Float64(Float64(-60.0 * Float64(y / Float64(z - t))) + Float64(a * 120.0)); elseif (y <= 1.05e+145) tmp = Float64(Float64(x * Float64(60.0 / Float64(z - t))) + Float64(a * 120.0)); else tmp = Float64(Float64(60.0 / Float64(Float64(t - z) / y)) + Float64(a * 120.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.3e-6) tmp = (-60.0 * (y / (z - t))) + (a * 120.0); elseif (y <= 1.05e+145) tmp = (x * (60.0 / (z - t))) + (a * 120.0); else tmp = (60.0 / ((t - z) / y)) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.3e-6], N[(N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e+145], N[(N[(x * N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 / N[(N[(t - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{-6}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t} + a \cdot 120\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+145}:\\
\;\;\;\;x \cdot \frac{60}{z - t} + a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{\frac{t - z}{y}} + a \cdot 120\\
\end{array}
\end{array}
if y < -1.30000000000000005e-6Initial program 98.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 87.7%
if -1.30000000000000005e-6 < y < 1.04999999999999995e145Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 89.7%
associate-*r/89.7%
associate-*l/89.7%
*-commutative89.7%
Simplified89.7%
if 1.04999999999999995e145 < y Initial program 96.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 96.9%
associate-*r/96.9%
neg-mul-196.9%
Simplified96.9%
Final simplification90.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* -60.0 (/ x t))))
(if (<= a -1.3e-127)
(* a 120.0)
(if (<= a 7.5e-288)
t_1
(if (<= a 1.05e-155)
(* -60.0 (/ y z))
(if (<= a 1.16e-120) t_1 (* a 120.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (x / t);
double tmp;
if (a <= -1.3e-127) {
tmp = a * 120.0;
} else if (a <= 7.5e-288) {
tmp = t_1;
} else if (a <= 1.05e-155) {
tmp = -60.0 * (y / z);
} else if (a <= 1.16e-120) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (-60.0d0) * (x / t)
if (a <= (-1.3d-127)) then
tmp = a * 120.0d0
else if (a <= 7.5d-288) then
tmp = t_1
else if (a <= 1.05d-155) then
tmp = (-60.0d0) * (y / z)
else if (a <= 1.16d-120) then
tmp = t_1
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (x / t);
double tmp;
if (a <= -1.3e-127) {
tmp = a * 120.0;
} else if (a <= 7.5e-288) {
tmp = t_1;
} else if (a <= 1.05e-155) {
tmp = -60.0 * (y / z);
} else if (a <= 1.16e-120) {
tmp = t_1;
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (x / t) tmp = 0 if a <= -1.3e-127: tmp = a * 120.0 elif a <= 7.5e-288: tmp = t_1 elif a <= 1.05e-155: tmp = -60.0 * (y / z) elif a <= 1.16e-120: tmp = t_1 else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(x / t)) tmp = 0.0 if (a <= -1.3e-127) tmp = Float64(a * 120.0); elseif (a <= 7.5e-288) tmp = t_1; elseif (a <= 1.05e-155) tmp = Float64(-60.0 * Float64(y / z)); elseif (a <= 1.16e-120) tmp = t_1; else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (x / t); tmp = 0.0; if (a <= -1.3e-127) tmp = a * 120.0; elseif (a <= 7.5e-288) tmp = t_1; elseif (a <= 1.05e-155) tmp = -60.0 * (y / z); elseif (a <= 1.16e-120) tmp = t_1; else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.3e-127], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 7.5e-288], t$95$1, If[LessEqual[a, 1.05e-155], N[(-60.0 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.16e-120], t$95$1, N[(a * 120.0), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -60 \cdot \frac{x}{t}\\
\mathbf{if}\;a \leq -1.3 \cdot 10^{-127}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{-288}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.05 \cdot 10^{-155}:\\
\;\;\;\;-60 \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 1.16 \cdot 10^{-120}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.29999999999999995e-127 or 1.16e-120 < a Initial program 98.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 68.4%
if -1.29999999999999995e-127 < a < 7.4999999999999998e-288 or 1.0500000000000001e-155 < a < 1.16e-120Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in z around 0 72.1%
Taylor expanded in t around 0 65.6%
Taylor expanded in x around inf 43.8%
if 7.4999999999999998e-288 < a < 1.0500000000000001e-155Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 70.7%
associate-*r/70.7%
neg-mul-170.7%
Simplified70.7%
Taylor expanded in z around inf 36.4%
Taylor expanded in y around inf 29.8%
Final simplification59.7%
(FPCore (x y z t a) :precision binary64 (if (<= x -1.15e+143) (* 60.0 (/ (- x y) (- z t))) (+ (* -60.0 (/ y (- z t))) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.15e+143) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (-60.0 * (y / (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 <= (-1.15d+143)) then
tmp = 60.0d0 * ((x - y) / (z - t))
else
tmp = ((-60.0d0) * (y / (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 <= -1.15e+143) {
tmp = 60.0 * ((x - y) / (z - t));
} else {
tmp = (-60.0 * (y / (z - t))) + (a * 120.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.15e+143: tmp = 60.0 * ((x - y) / (z - t)) else: tmp = (-60.0 * (y / (z - t))) + (a * 120.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.15e+143) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); else tmp = Float64(Float64(-60.0 * Float64(y / 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 <= -1.15e+143) tmp = 60.0 * ((x - y) / (z - t)); else tmp = (-60.0 * (y / (z - t))) + (a * 120.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.15e+143], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{+143}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t} + a \cdot 120\\
\end{array}
\end{array}
if x < -1.15e143Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 77.9%
if -1.15e143 < x Initial program 98.9%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 83.1%
Final simplification82.4%
(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.0%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.1e-127)
(* a 120.0)
(if (<= a -9e-294)
(* -60.0 (/ x t))
(if (<= a 2.4e-184) (* 60.0 (/ y t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.1e-127) {
tmp = a * 120.0;
} else if (a <= -9e-294) {
tmp = -60.0 * (x / t);
} else if (a <= 2.4e-184) {
tmp = 60.0 * (y / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.1d-127)) then
tmp = a * 120.0d0
else if (a <= (-9d-294)) then
tmp = (-60.0d0) * (x / t)
else if (a <= 2.4d-184) then
tmp = 60.0d0 * (y / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.1e-127) {
tmp = a * 120.0;
} else if (a <= -9e-294) {
tmp = -60.0 * (x / t);
} else if (a <= 2.4e-184) {
tmp = 60.0 * (y / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.1e-127: tmp = a * 120.0 elif a <= -9e-294: tmp = -60.0 * (x / t) elif a <= 2.4e-184: tmp = 60.0 * (y / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.1e-127) tmp = Float64(a * 120.0); elseif (a <= -9e-294) tmp = Float64(-60.0 * Float64(x / t)); elseif (a <= 2.4e-184) tmp = Float64(60.0 * Float64(y / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.1e-127) tmp = a * 120.0; elseif (a <= -9e-294) tmp = -60.0 * (x / t); elseif (a <= 2.4e-184) tmp = 60.0 * (y / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.1e-127], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -9e-294], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.4e-184], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{-127}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -9 \cdot 10^{-294}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{-184}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.1000000000000001e-127 or 2.40000000000000024e-184 < a Initial program 98.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 65.5%
if -1.1000000000000001e-127 < a < -8.99999999999999963e-294Initial program 99.5%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in z around 0 73.6%
Taylor expanded in t around 0 66.7%
Taylor expanded in x around inf 46.3%
if -8.99999999999999963e-294 < a < 2.40000000000000024e-184Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in z around 0 55.6%
Taylor expanded in t around 0 50.4%
Taylor expanded in x around 0 40.8%
Final simplification60.3%
(FPCore (x y z t a)
:precision binary64
(if (<= a -4.2e-126)
(* a 120.0)
(if (<= a -6e-293)
(* x (/ -60.0 t))
(if (<= a 9e-182) (* 60.0 (/ y t)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.2e-126) {
tmp = a * 120.0;
} else if (a <= -6e-293) {
tmp = x * (-60.0 / t);
} else if (a <= 9e-182) {
tmp = 60.0 * (y / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-4.2d-126)) then
tmp = a * 120.0d0
else if (a <= (-6d-293)) then
tmp = x * ((-60.0d0) / t)
else if (a <= 9d-182) then
tmp = 60.0d0 * (y / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.2e-126) {
tmp = a * 120.0;
} else if (a <= -6e-293) {
tmp = x * (-60.0 / t);
} else if (a <= 9e-182) {
tmp = 60.0 * (y / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.2e-126: tmp = a * 120.0 elif a <= -6e-293: tmp = x * (-60.0 / t) elif a <= 9e-182: tmp = 60.0 * (y / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.2e-126) tmp = Float64(a * 120.0); elseif (a <= -6e-293) tmp = Float64(x * Float64(-60.0 / t)); elseif (a <= 9e-182) tmp = Float64(60.0 * Float64(y / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.2e-126) tmp = a * 120.0; elseif (a <= -6e-293) tmp = x * (-60.0 / t); elseif (a <= 9e-182) tmp = 60.0 * (y / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.2e-126], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, -6e-293], N[(x * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e-182], N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{-126}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq -6 \cdot 10^{-293}:\\
\;\;\;\;x \cdot \frac{-60}{t}\\
\mathbf{elif}\;a \leq 9 \cdot 10^{-182}:\\
\;\;\;\;60 \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -4.1999999999999997e-126 or 8.9999999999999998e-182 < a Initial program 98.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 65.5%
if -4.1999999999999997e-126 < a < -6.0000000000000003e-293Initial program 99.5%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in z around 0 73.6%
Taylor expanded in x around inf 52.0%
Taylor expanded in x around inf 46.3%
associate-*r/46.3%
associate-*l/46.3%
*-commutative46.3%
Simplified46.3%
if -6.0000000000000003e-293 < a < 8.9999999999999998e-182Initial program 99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in z around 0 55.6%
Taylor expanded in t around 0 50.4%
Taylor expanded in x around 0 40.8%
Final simplification60.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7.5e-112) (not (<= a 8.2e+38))) (* a 120.0) (* -60.0 (/ (- x y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.5e-112) || !(a <= 8.2e+38)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-7.5d-112)) .or. (.not. (a <= 8.2d+38))) then
tmp = a * 120.0d0
else
tmp = (-60.0d0) * ((x - y) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.5e-112) || !(a <= 8.2e+38)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7.5e-112) or not (a <= 8.2e+38): tmp = a * 120.0 else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7.5e-112) || !(a <= 8.2e+38)) tmp = Float64(a * 120.0); else tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7.5e-112) || ~((a <= 8.2e+38))) tmp = a * 120.0; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.5e-112], N[Not[LessEqual[a, 8.2e+38]], $MachinePrecision]], N[(a * 120.0), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{-112} \lor \neg \left(a \leq 8.2 \cdot 10^{+38}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -7.5000000000000002e-112 or 8.2000000000000007e38 < a Initial program 98.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 79.5%
if -7.5000000000000002e-112 < a < 8.2000000000000007e38Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around 0 65.1%
Taylor expanded in t around 0 53.5%
Final simplification67.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -8.5e-130) (* a 120.0) (if (<= a 8e-121) (* -60.0 (/ x t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8.5e-130) {
tmp = a * 120.0;
} else if (a <= 8e-121) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-8.5d-130)) then
tmp = a * 120.0d0
else if (a <= 8d-121) then
tmp = (-60.0d0) * (x / t)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8.5e-130) {
tmp = a * 120.0;
} else if (a <= 8e-121) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -8.5e-130: tmp = a * 120.0 elif a <= 8e-121: tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -8.5e-130) tmp = Float64(a * 120.0); elseif (a <= 8e-121) tmp = Float64(-60.0 * Float64(x / t)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -8.5e-130) tmp = a * 120.0; elseif (a <= 8e-121) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -8.5e-130], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 8e-121], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.5 \cdot 10^{-130}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 8 \cdot 10^{-121}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -8.50000000000000033e-130 or 7.9999999999999998e-121 < a Initial program 98.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 68.4%
if -8.50000000000000033e-130 < a < 7.9999999999999998e-121Initial program 99.6%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in z around 0 63.5%
Taylor expanded in t around 0 55.9%
Taylor expanded in x around inf 31.7%
Final simplification57.8%
(FPCore (x y z t a) :precision binary64 (* a 120.0))
double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = a * 120.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return a * 120.0;
}
def code(x, y, z, t, a): return a * 120.0
function code(x, y, z, t, a) return Float64(a * 120.0) end
function tmp = code(x, y, z, t, a) tmp = a * 120.0; end
code[x_, y_, z_, t_, a_] := N[(a * 120.0), $MachinePrecision]
\begin{array}{l}
\\
a \cdot 120
\end{array}
Initial program 99.0%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 51.6%
Final simplification51.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 2023293
(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)))