
(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 (* (/ 60.0 (- z t)) (- x y))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((60.0 / (z - t)) * (x - y)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a, 120, \frac{60}{z - t} \cdot \left(x - y\right)\right)
\end{array}
Initial program 99.8%
+-commutative99.8%
fma-def99.8%
associate-*l/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -10000000000.0)
(* a 120.0)
(if (or (<= (* a 120.0) -2e-34)
(and (not (<= (* a 120.0) -2e-71)) (<= (* a 120.0) 2e-16)))
(* 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) <= -10000000000.0) {
tmp = a * 120.0;
} else if (((a * 120.0) <= -2e-34) || (!((a * 120.0) <= -2e-71) && ((a * 120.0) <= 2e-16))) {
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) <= (-10000000000.0d0)) then
tmp = a * 120.0d0
else if (((a * 120.0d0) <= (-2d-34)) .or. (.not. ((a * 120.0d0) <= (-2d-71))) .and. ((a * 120.0d0) <= 2d-16)) 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) <= -10000000000.0) {
tmp = a * 120.0;
} else if (((a * 120.0) <= -2e-34) || (!((a * 120.0) <= -2e-71) && ((a * 120.0) <= 2e-16))) {
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) <= -10000000000.0: tmp = a * 120.0 elif ((a * 120.0) <= -2e-34) or (not ((a * 120.0) <= -2e-71) and ((a * 120.0) <= 2e-16)): 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) <= -10000000000.0) tmp = Float64(a * 120.0); elseif ((Float64(a * 120.0) <= -2e-34) || (!(Float64(a * 120.0) <= -2e-71) && (Float64(a * 120.0) <= 2e-16))) 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) <= -10000000000.0) tmp = a * 120.0; elseif (((a * 120.0) <= -2e-34) || (~(((a * 120.0) <= -2e-71)) && ((a * 120.0) <= 2e-16))) 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], -10000000000.0], N[(a * 120.0), $MachinePrecision], If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-34], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-71]], $MachinePrecision], LessEqual[N[(a * 120.0), $MachinePrecision], 2e-16]]], 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 -10000000000:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-34} \lor \neg \left(a \cdot 120 \leq -2 \cdot 10^{-71}\right) \land a \cdot 120 \leq 2 \cdot 10^{-16}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -1e10 or -1.99999999999999986e-34 < (*.f64 a 120) < -1.9999999999999998e-71 or 2e-16 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 76.3%
if -1e10 < (*.f64 a 120) < -1.99999999999999986e-34 or -1.9999999999999998e-71 < (*.f64 a 120) < 2e-16Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 82.7%
Final simplification79.3%
(FPCore (x y z t a)
:precision binary64
(if (<= (* a 120.0) -5e+28)
(+ (* a 120.0) (* x (/ 60.0 z)))
(if (or (<= (* a 120.0) -2e-34)
(and (not (<= (* a 120.0) -2e-71)) (<= (* a 120.0) 2e-16)))
(* 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) <= -5e+28) {
tmp = (a * 120.0) + (x * (60.0 / z));
} else if (((a * 120.0) <= -2e-34) || (!((a * 120.0) <= -2e-71) && ((a * 120.0) <= 2e-16))) {
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) <= (-5d+28)) then
tmp = (a * 120.0d0) + (x * (60.0d0 / z))
else if (((a * 120.0d0) <= (-2d-34)) .or. (.not. ((a * 120.0d0) <= (-2d-71))) .and. ((a * 120.0d0) <= 2d-16)) 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) <= -5e+28) {
tmp = (a * 120.0) + (x * (60.0 / z));
} else if (((a * 120.0) <= -2e-34) || (!((a * 120.0) <= -2e-71) && ((a * 120.0) <= 2e-16))) {
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) <= -5e+28: tmp = (a * 120.0) + (x * (60.0 / z)) elif ((a * 120.0) <= -2e-34) or (not ((a * 120.0) <= -2e-71) and ((a * 120.0) <= 2e-16)): 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) <= -5e+28) tmp = Float64(Float64(a * 120.0) + Float64(x * Float64(60.0 / z))); elseif ((Float64(a * 120.0) <= -2e-34) || (!(Float64(a * 120.0) <= -2e-71) && (Float64(a * 120.0) <= 2e-16))) 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) <= -5e+28) tmp = (a * 120.0) + (x * (60.0 / z)); elseif (((a * 120.0) <= -2e-34) || (~(((a * 120.0) <= -2e-71)) && ((a * 120.0) <= 2e-16))) 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], -5e+28], N[(N[(a * 120.0), $MachinePrecision] + N[(x * N[(60.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-34], And[N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-71]], $MachinePrecision], LessEqual[N[(a * 120.0), $MachinePrecision], 2e-16]]], 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 -5 \cdot 10^{+28}:\\
\;\;\;\;a \cdot 120 + x \cdot \frac{60}{z}\\
\mathbf{elif}\;a \cdot 120 \leq -2 \cdot 10^{-34} \lor \neg \left(a \cdot 120 \leq -2 \cdot 10^{-71}\right) \land a \cdot 120 \leq 2 \cdot 10^{-16}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if (*.f64 a 120) < -4.99999999999999957e28Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 93.9%
associate-*r/93.9%
associate-*l/93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in z around inf 82.7%
if -4.99999999999999957e28 < (*.f64 a 120) < -1.99999999999999986e-34 or -1.9999999999999998e-71 < (*.f64 a 120) < 2e-16Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 81.9%
if -1.99999999999999986e-34 < (*.f64 a 120) < -1.9999999999999998e-71 or 2e-16 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 74.7%
Final simplification80.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= (* a 120.0) -2e-71) (not (<= (* a 120.0) 2e-16))) (+ (* a 120.0) (* (/ 60.0 (- z t)) x)) (* 60.0 (/ (- x y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((a * 120.0) <= -2e-71) || !((a * 120.0) <= 2e-16)) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} 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 (((a * 120.0d0) <= (-2d-71)) .or. (.not. ((a * 120.0d0) <= 2d-16))) then
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
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 (((a * 120.0) <= -2e-71) || !((a * 120.0) <= 2e-16)) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else {
tmp = 60.0 * ((x - y) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((a * 120.0) <= -2e-71) or not ((a * 120.0) <= 2e-16): tmp = (a * 120.0) + ((60.0 / (z - t)) * x) else: tmp = 60.0 * ((x - y) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((Float64(a * 120.0) <= -2e-71) || !(Float64(a * 120.0) <= 2e-16)) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); 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 (((a * 120.0) <= -2e-71) || ~(((a * 120.0) <= 2e-16))) tmp = (a * 120.0) + ((60.0 / (z - t)) * x); else tmp = 60.0 * ((x - y) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[N[(a * 120.0), $MachinePrecision], -2e-71], N[Not[LessEqual[N[(a * 120.0), $MachinePrecision], 2e-16]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 120 \leq -2 \cdot 10^{-71} \lor \neg \left(a \cdot 120 \leq 2 \cdot 10^{-16}\right):\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\mathbf{else}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\end{array}
\end{array}
if (*.f64 a 120) < -1.9999999999999998e-71 or 2e-16 < (*.f64 a 120) Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 88.5%
associate-*r/88.5%
associate-*l/88.5%
*-commutative88.5%
Simplified88.5%
if -1.9999999999999998e-71 < (*.f64 a 120) < 2e-16Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 82.3%
Final simplification85.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.2e+114) (not (<= y 820.0))) (+ (* a 120.0) (/ -60.0 (/ (- z t) y))) (+ (* a 120.0) (* (/ 60.0 (- z t)) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.2e+114) || !(y <= 820.0)) {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
} else {
tmp = (a * 120.0) + ((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 ((y <= (-3.2d+114)) .or. (.not. (y <= 820.0d0))) then
tmp = (a * 120.0d0) + ((-60.0d0) / ((z - t) / y))
else
tmp = (a * 120.0d0) + ((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 ((y <= -3.2e+114) || !(y <= 820.0)) {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
} else {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.2e+114) or not (y <= 820.0): tmp = (a * 120.0) + (-60.0 / ((z - t) / y)) else: tmp = (a * 120.0) + ((60.0 / (z - t)) * x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.2e+114) || !(y <= 820.0)) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(Float64(z - t) / y))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -3.2e+114) || ~((y <= 820.0))) tmp = (a * 120.0) + (-60.0 / ((z - t) / y)); else tmp = (a * 120.0) + ((60.0 / (z - t)) * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.2e+114], N[Not[LessEqual[y, 820.0]], $MachinePrecision]], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+114} \lor \neg \left(y \leq 820\right):\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\end{array}
\end{array}
if y < -3.2e114 or 820 < y Initial program 99.7%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 88.5%
associate-*r/88.5%
associate-/l*88.5%
Simplified88.5%
if -3.2e114 < y < 820Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 94.3%
associate-*r/94.3%
associate-*l/94.3%
*-commutative94.3%
Simplified94.3%
Final simplification92.2%
(FPCore (x y z t a)
:precision binary64
(if (<= y -2.9e+113)
(+ (* a 120.0) (/ -60.0 (/ (- z t) y)))
(if (<= y 750.0)
(+ (* a 120.0) (* (/ 60.0 (- z t)) x))
(+ (* a 120.0) (/ (* y -60.0) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.9e+113) {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
} else if (y <= 750.0) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-2.9d+113)) then
tmp = (a * 120.0d0) + ((-60.0d0) / ((z - t) / y))
else if (y <= 750.0d0) then
tmp = (a * 120.0d0) + ((60.0d0 / (z - t)) * x)
else
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.9e+113) {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
} else if (y <= 750.0) {
tmp = (a * 120.0) + ((60.0 / (z - t)) * x);
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.9e+113: tmp = (a * 120.0) + (-60.0 / ((z - t) / y)) elif y <= 750.0: tmp = (a * 120.0) + ((60.0 / (z - t)) * x) else: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.9e+113) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(Float64(z - t) / y))); elseif (y <= 750.0) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 / Float64(z - t)) * x)); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.9e+113) tmp = (a * 120.0) + (-60.0 / ((z - t) / y)); elseif (y <= 750.0) tmp = (a * 120.0) + ((60.0 / (z - t)) * x); else tmp = (a * 120.0) + ((y * -60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.9e+113], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 750.0], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+113}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\
\mathbf{elif}\;y \leq 750:\\
\;\;\;\;a \cdot 120 + \frac{60}{z - t} \cdot x\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if y < -2.89999999999999984e113Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 91.8%
associate-*r/91.7%
associate-/l*91.8%
Simplified91.8%
if -2.89999999999999984e113 < y < 750Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around inf 94.3%
associate-*r/94.3%
associate-*l/94.3%
*-commutative94.3%
Simplified94.3%
if 750 < y Initial program 99.8%
Taylor expanded in x around 0 86.5%
Final simplification92.2%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.75e+113)
(+ (* a 120.0) (/ -60.0 (/ (- z t) y)))
(if (<= y 520.0)
(+ (* a 120.0) (/ (* 60.0 x) (- z t)))
(+ (* a 120.0) (/ (* y -60.0) (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.75e+113) {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
} else if (y <= 520.0) {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.75d+113)) then
tmp = (a * 120.0d0) + ((-60.0d0) / ((z - t) / y))
else if (y <= 520.0d0) then
tmp = (a * 120.0d0) + ((60.0d0 * x) / (z - t))
else
tmp = (a * 120.0d0) + ((y * (-60.0d0)) / (z - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.75e+113) {
tmp = (a * 120.0) + (-60.0 / ((z - t) / y));
} else if (y <= 520.0) {
tmp = (a * 120.0) + ((60.0 * x) / (z - t));
} else {
tmp = (a * 120.0) + ((y * -60.0) / (z - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.75e+113: tmp = (a * 120.0) + (-60.0 / ((z - t) / y)) elif y <= 520.0: tmp = (a * 120.0) + ((60.0 * x) / (z - t)) else: tmp = (a * 120.0) + ((y * -60.0) / (z - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.75e+113) tmp = Float64(Float64(a * 120.0) + Float64(-60.0 / Float64(Float64(z - t) / y))); elseif (y <= 520.0) tmp = Float64(Float64(a * 120.0) + Float64(Float64(60.0 * x) / Float64(z - t))); else tmp = Float64(Float64(a * 120.0) + Float64(Float64(y * -60.0) / Float64(z - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.75e+113) tmp = (a * 120.0) + (-60.0 / ((z - t) / y)); elseif (y <= 520.0) tmp = (a * 120.0) + ((60.0 * x) / (z - t)); else tmp = (a * 120.0) + ((y * -60.0) / (z - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.75e+113], N[(N[(a * 120.0), $MachinePrecision] + N[(-60.0 / N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 520.0], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(60.0 * x), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * 120.0), $MachinePrecision] + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{+113}:\\
\;\;\;\;a \cdot 120 + \frac{-60}{\frac{z - t}{y}}\\
\mathbf{elif}\;y \leq 520:\\
\;\;\;\;a \cdot 120 + \frac{60 \cdot x}{z - t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120 + \frac{y \cdot -60}{z - t}\\
\end{array}
\end{array}
if y < -1.75e113Initial program 99.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 91.8%
associate-*r/91.7%
associate-/l*91.8%
Simplified91.8%
if -1.75e113 < y < 520Initial program 99.8%
Taylor expanded in x around inf 94.3%
*-commutative94.3%
Simplified94.3%
if 520 < y Initial program 99.8%
Taylor expanded in x around 0 86.5%
Final simplification92.2%
(FPCore (x y z t a)
:precision binary64
(if (<= a -7.6e-75)
(* a 120.0)
(if (<= a 8e-78)
(* -60.0 (/ (- x y) t))
(if (<= a 7.5e-16) (* 60.0 (/ (- x y) z)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.6e-75) {
tmp = a * 120.0;
} else if (a <= 8e-78) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 7.5e-16) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-7.6d-75)) then
tmp = a * 120.0d0
else if (a <= 8d-78) then
tmp = (-60.0d0) * ((x - y) / t)
else if (a <= 7.5d-16) then
tmp = 60.0d0 * ((x - y) / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.6e-75) {
tmp = a * 120.0;
} else if (a <= 8e-78) {
tmp = -60.0 * ((x - y) / t);
} else if (a <= 7.5e-16) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7.6e-75: tmp = a * 120.0 elif a <= 8e-78: tmp = -60.0 * ((x - y) / t) elif a <= 7.5e-16: tmp = 60.0 * ((x - y) / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.6e-75) tmp = Float64(a * 120.0); elseif (a <= 8e-78) tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); elseif (a <= 7.5e-16) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -7.6e-75) tmp = a * 120.0; elseif (a <= 8e-78) tmp = -60.0 * ((x - y) / t); elseif (a <= 7.5e-16) tmp = 60.0 * ((x - y) / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.6e-75], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 8e-78], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.5e-16], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.6 \cdot 10^{-75}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 8 \cdot 10^{-78}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{-16}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -7.59999999999999987e-75 or 7.5e-16 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 73.0%
if -7.59999999999999987e-75 < a < 7.99999999999999999e-78Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 82.1%
Taylor expanded in z around 0 47.3%
if 7.99999999999999999e-78 < a < 7.5e-16Initial program 99.6%
associate-/l*99.3%
Simplified99.3%
Taylor expanded in a around 0 86.0%
Taylor expanded in z around inf 85.8%
Final simplification63.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.55e-76)
(* a 120.0)
(if (<= a 2.9e-74)
(* (- x y) (/ -60.0 t))
(if (<= a 1.9e-16) (* 60.0 (/ (- x y) z)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.55e-76) {
tmp = a * 120.0;
} else if (a <= 2.9e-74) {
tmp = (x - y) * (-60.0 / t);
} else if (a <= 1.9e-16) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.55d-76)) then
tmp = a * 120.0d0
else if (a <= 2.9d-74) then
tmp = (x - y) * ((-60.0d0) / t)
else if (a <= 1.9d-16) then
tmp = 60.0d0 * ((x - y) / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.55e-76) {
tmp = a * 120.0;
} else if (a <= 2.9e-74) {
tmp = (x - y) * (-60.0 / t);
} else if (a <= 1.9e-16) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.55e-76: tmp = a * 120.0 elif a <= 2.9e-74: tmp = (x - y) * (-60.0 / t) elif a <= 1.9e-16: tmp = 60.0 * ((x - y) / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.55e-76) tmp = Float64(a * 120.0); elseif (a <= 2.9e-74) tmp = Float64(Float64(x - y) * Float64(-60.0 / t)); elseif (a <= 1.9e-16) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.55e-76) tmp = a * 120.0; elseif (a <= 2.9e-74) tmp = (x - y) * (-60.0 / t); elseif (a <= 1.9e-16) tmp = 60.0 * ((x - y) / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.55e-76], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 2.9e-74], N[(N[(x - y), $MachinePrecision] * N[(-60.0 / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.9e-16], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.55 \cdot 10^{-76}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{-74}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{-60}{t}\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{-16}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -1.54999999999999985e-76 or 1.90000000000000006e-16 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 73.0%
if -1.54999999999999985e-76 < a < 2.9e-74Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 82.1%
Taylor expanded in z around 0 47.3%
*-commutative47.3%
metadata-eval47.3%
times-frac47.2%
associate-*r/47.3%
*-commutative47.3%
associate-/r*47.3%
metadata-eval47.3%
Simplified47.3%
if 2.9e-74 < a < 1.90000000000000006e-16Initial program 99.6%
associate-/l*99.3%
Simplified99.3%
Taylor expanded in a around 0 86.0%
Taylor expanded in z around inf 85.8%
Final simplification63.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -5e-74)
(* a 120.0)
(if (<= a 3.1e-77)
(/ -60.0 (/ t (- x y)))
(if (<= a 4e-18) (* 60.0 (/ (- x y) z)) (* a 120.0)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5e-74) {
tmp = a * 120.0;
} else if (a <= 3.1e-77) {
tmp = -60.0 / (t / (x - y));
} else if (a <= 4e-18) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-5d-74)) then
tmp = a * 120.0d0
else if (a <= 3.1d-77) then
tmp = (-60.0d0) / (t / (x - y))
else if (a <= 4d-18) then
tmp = 60.0d0 * ((x - y) / z)
else
tmp = a * 120.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5e-74) {
tmp = a * 120.0;
} else if (a <= 3.1e-77) {
tmp = -60.0 / (t / (x - y));
} else if (a <= 4e-18) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5e-74: tmp = a * 120.0 elif a <= 3.1e-77: tmp = -60.0 / (t / (x - y)) elif a <= 4e-18: tmp = 60.0 * ((x - y) / z) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5e-74) tmp = Float64(a * 120.0); elseif (a <= 3.1e-77) tmp = Float64(-60.0 / Float64(t / Float64(x - y))); elseif (a <= 4e-18) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); else tmp = Float64(a * 120.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5e-74) tmp = a * 120.0; elseif (a <= 3.1e-77) tmp = -60.0 / (t / (x - y)); elseif (a <= 4e-18) tmp = 60.0 * ((x - y) / z); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5e-74], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 3.1e-77], N[(-60.0 / N[(t / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4e-18], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \cdot 10^{-74}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-77}:\\
\;\;\;\;\frac{-60}{\frac{t}{x - y}}\\
\mathbf{elif}\;a \leq 4 \cdot 10^{-18}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -4.99999999999999998e-74 or 4.0000000000000003e-18 < a Initial program 99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 73.0%
if -4.99999999999999998e-74 < a < 3.10000000000000008e-77Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 82.1%
Taylor expanded in z around 0 47.3%
clear-num47.3%
un-div-inv47.4%
Applied egg-rr47.4%
if 3.10000000000000008e-77 < a < 4.0000000000000003e-18Initial program 99.6%
associate-/l*99.3%
Simplified99.3%
Taylor expanded in a around 0 86.0%
Taylor expanded in z around inf 85.8%
Final simplification63.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 99.8%
associate-/l*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.65e-75) (not (<= a 2.8e-97))) (* a 120.0) (* -60.0 (/ (- x y) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.65e-75) || !(a <= 2.8e-97)) {
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 <= (-1.65d-75)) .or. (.not. (a <= 2.8d-97))) 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 <= -1.65e-75) || !(a <= 2.8e-97)) {
tmp = a * 120.0;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.65e-75) or not (a <= 2.8e-97): 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 <= -1.65e-75) || !(a <= 2.8e-97)) 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 <= -1.65e-75) || ~((a <= 2.8e-97))) 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, -1.65e-75], N[Not[LessEqual[a, 2.8e-97]], $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 -1.65 \cdot 10^{-75} \lor \neg \left(a \leq 2.8 \cdot 10^{-97}\right):\\
\;\;\;\;a \cdot 120\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -1.65e-75 or 2.8000000000000002e-97 < a Initial program 99.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 69.2%
if -1.65e-75 < a < 2.8000000000000002e-97Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 84.7%
Taylor expanded in z around 0 48.0%
Final simplification61.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -4.3e-160) (* a 120.0) (if (<= a 5.6e-188) (* -60.0 (/ x t)) (* a 120.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.3e-160) {
tmp = a * 120.0;
} else if (a <= 5.6e-188) {
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 <= (-4.3d-160)) then
tmp = a * 120.0d0
else if (a <= 5.6d-188) 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 <= -4.3e-160) {
tmp = a * 120.0;
} else if (a <= 5.6e-188) {
tmp = -60.0 * (x / t);
} else {
tmp = a * 120.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.3e-160: tmp = a * 120.0 elif a <= 5.6e-188: tmp = -60.0 * (x / t) else: tmp = a * 120.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.3e-160) tmp = Float64(a * 120.0); elseif (a <= 5.6e-188) 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 <= -4.3e-160) tmp = a * 120.0; elseif (a <= 5.6e-188) tmp = -60.0 * (x / t); else tmp = a * 120.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.3e-160], N[(a * 120.0), $MachinePrecision], If[LessEqual[a, 5.6e-188], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(a * 120.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.3 \cdot 10^{-160}:\\
\;\;\;\;a \cdot 120\\
\mathbf{elif}\;a \leq 5.6 \cdot 10^{-188}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;a \cdot 120\\
\end{array}
\end{array}
if a < -4.30000000000000014e-160 or 5.6000000000000002e-188 < a Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 61.5%
if -4.30000000000000014e-160 < a < 5.6000000000000002e-188Initial program 99.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in a around 0 90.2%
Taylor expanded in z around 0 48.0%
Taylor expanded in x around inf 29.2%
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 50.1%
Final simplification50.1%
(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 2023258
(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)))