
(FPCore (x y z t) :precision binary64 (+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))
double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x / y) + ((2.0d0 + ((z * 2.0d0) * (1.0d0 - t))) / (t * z))
end function
public static double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
def code(x, y, z, t): return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z))
function code(x, y, z, t) return Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(Float64(z * 2.0) * Float64(1.0 - t))) / Float64(t * z))) end
function tmp = code(x, y, z, t) tmp = (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z)); end
code[x_, y_, z_, t_] := N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 + N[(N[(z * 2.0), $MachinePrecision] * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))
double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x / y) + ((2.0d0 + ((z * 2.0d0) * (1.0d0 - t))) / (t * z))
end function
public static double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
def code(x, y, z, t): return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z))
function code(x, y, z, t) return Float64(Float64(x / y) + Float64(Float64(2.0 + Float64(Float64(z * 2.0) * Float64(1.0 - t))) / Float64(t * z))) end
function tmp = code(x, y, z, t) tmp = (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z)); end
code[x_, y_, z_, t_] := N[(N[(x / y), $MachinePrecision] + N[(N[(2.0 + N[(N[(z * 2.0), $MachinePrecision] * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}
\end{array}
(FPCore (x y z t) :precision binary64 (+ (/ (+ 2.0 (/ 2.0 z)) t) (+ -2.0 (/ x y))))
double code(double x, double y, double z, double t) {
return ((2.0 + (2.0 / z)) / t) + (-2.0 + (x / y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = ((2.0d0 + (2.0d0 / z)) / t) + ((-2.0d0) + (x / y))
end function
public static double code(double x, double y, double z, double t) {
return ((2.0 + (2.0 / z)) / t) + (-2.0 + (x / y));
}
def code(x, y, z, t): return ((2.0 + (2.0 / z)) / t) + (-2.0 + (x / y))
function code(x, y, z, t) return Float64(Float64(Float64(2.0 + Float64(2.0 / z)) / t) + Float64(-2.0 + Float64(x / y))) end
function tmp = code(x, y, z, t) tmp = ((2.0 + (2.0 / z)) / t) + (-2.0 + (x / y)); end
code[x_, y_, z_, t_] := N[(N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] + N[(-2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{2 + \frac{2}{z}}{t} + \left(-2 + \frac{x}{y}\right)
\end{array}
Initial program 88.5%
Simplified99.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ -2.0 (/ x y))) (t_2 (+ -2.0 (/ 2.0 t))))
(if (<= z -9.5e+126)
t_2
(if (<= z -9.5e-196)
t_1
(if (<= z 2.3e-31)
(/ 2.0 (* z t))
(if (<= z 280000000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t) {
double t_1 = -2.0 + (x / y);
double t_2 = -2.0 + (2.0 / t);
double tmp;
if (z <= -9.5e+126) {
tmp = t_2;
} else if (z <= -9.5e-196) {
tmp = t_1;
} else if (z <= 2.3e-31) {
tmp = 2.0 / (z * t);
} else if (z <= 280000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-2.0d0) + (x / y)
t_2 = (-2.0d0) + (2.0d0 / t)
if (z <= (-9.5d+126)) then
tmp = t_2
else if (z <= (-9.5d-196)) then
tmp = t_1
else if (z <= 2.3d-31) then
tmp = 2.0d0 / (z * t)
else if (z <= 280000000000.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = -2.0 + (x / y);
double t_2 = -2.0 + (2.0 / t);
double tmp;
if (z <= -9.5e+126) {
tmp = t_2;
} else if (z <= -9.5e-196) {
tmp = t_1;
} else if (z <= 2.3e-31) {
tmp = 2.0 / (z * t);
} else if (z <= 280000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = -2.0 + (x / y) t_2 = -2.0 + (2.0 / t) tmp = 0 if z <= -9.5e+126: tmp = t_2 elif z <= -9.5e-196: tmp = t_1 elif z <= 2.3e-31: tmp = 2.0 / (z * t) elif z <= 280000000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(-2.0 + Float64(x / y)) t_2 = Float64(-2.0 + Float64(2.0 / t)) tmp = 0.0 if (z <= -9.5e+126) tmp = t_2; elseif (z <= -9.5e-196) tmp = t_1; elseif (z <= 2.3e-31) tmp = Float64(2.0 / Float64(z * t)); elseif (z <= 280000000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -2.0 + (x / y); t_2 = -2.0 + (2.0 / t); tmp = 0.0; if (z <= -9.5e+126) tmp = t_2; elseif (z <= -9.5e-196) tmp = t_1; elseif (z <= 2.3e-31) tmp = 2.0 / (z * t); elseif (z <= 280000000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.5e+126], t$95$2, If[LessEqual[z, -9.5e-196], t$95$1, If[LessEqual[z, 2.3e-31], N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 280000000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -2 + \frac{x}{y}\\
t_2 := -2 + \frac{2}{t}\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{+126}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-31}:\\
\;\;\;\;\frac{2}{z \cdot t}\\
\mathbf{elif}\;z \leq 280000000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -9.49999999999999951e126 or 2.8e11 < z Initial program 73.2%
Simplified100.0%
Taylor expanded in x around 0
Simplified71.0%
Taylor expanded in z around inf
Simplified70.8%
if -9.49999999999999951e126 < z < -9.50000000000000032e-196 or 2.2999999999999998e-31 < z < 2.8e11Initial program 97.2%
Taylor expanded in t around inf
Simplified70.4%
if -9.50000000000000032e-196 < z < 2.2999999999999998e-31Initial program 98.6%
Taylor expanded in t around 0
/-lowering-/.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
*-lft-identityN/A
associate-*l/N/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f6494.1%
Simplified94.1%
Taylor expanded in z around 0
/-lowering-/.f64N/A
*-lowering-*.f6479.4%
Simplified79.4%
Final simplification73.5%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (/ (+ 2.0 (/ 2.0 z)) t)) (t_2 (+ t_1 (/ x y)))) (if (<= (/ x y) -2e+14) t_2 (if (<= (/ x y) 1e-21) (+ t_1 -2.0) t_2))))
double code(double x, double y, double z, double t) {
double t_1 = (2.0 + (2.0 / z)) / t;
double t_2 = t_1 + (x / y);
double tmp;
if ((x / y) <= -2e+14) {
tmp = t_2;
} else if ((x / y) <= 1e-21) {
tmp = t_1 + -2.0;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (2.0d0 + (2.0d0 / z)) / t
t_2 = t_1 + (x / y)
if ((x / y) <= (-2d+14)) then
tmp = t_2
else if ((x / y) <= 1d-21) then
tmp = t_1 + (-2.0d0)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (2.0 + (2.0 / z)) / t;
double t_2 = t_1 + (x / y);
double tmp;
if ((x / y) <= -2e+14) {
tmp = t_2;
} else if ((x / y) <= 1e-21) {
tmp = t_1 + -2.0;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = (2.0 + (2.0 / z)) / t t_2 = t_1 + (x / y) tmp = 0 if (x / y) <= -2e+14: tmp = t_2 elif (x / y) <= 1e-21: tmp = t_1 + -2.0 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(2.0 + Float64(2.0 / z)) / t) t_2 = Float64(t_1 + Float64(x / y)) tmp = 0.0 if (Float64(x / y) <= -2e+14) tmp = t_2; elseif (Float64(x / y) <= 1e-21) tmp = Float64(t_1 + -2.0); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (2.0 + (2.0 / z)) / t; t_2 = t_1 + (x / y); tmp = 0.0; if ((x / y) <= -2e+14) tmp = t_2; elseif ((x / y) <= 1e-21) tmp = t_1 + -2.0; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(x / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x / y), $MachinePrecision], -2e+14], t$95$2, If[LessEqual[N[(x / y), $MachinePrecision], 1e-21], N[(t$95$1 + -2.0), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{2 + \frac{2}{z}}{t}\\
t_2 := t\_1 + \frac{x}{y}\\
\mathbf{if}\;\frac{x}{y} \leq -2 \cdot 10^{+14}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{-21}:\\
\;\;\;\;t\_1 + -2\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (/.f64 x y) < -2e14 or 9.99999999999999908e-22 < (/.f64 x y) Initial program 89.5%
Simplified99.2%
Taylor expanded in x around inf
/-lowering-/.f6498.8%
Simplified98.8%
if -2e14 < (/.f64 x y) < 9.99999999999999908e-22Initial program 87.2%
Simplified99.8%
Taylor expanded in x around 0
Simplified99.4%
(FPCore (x y z t)
:precision binary64
(if (<= (/ x y) -0.092)
(/ x y)
(if (<= (/ x y) 8.5e-172)
-2.0
(if (<= (/ x y) 2.2e+88) (/ 2.0 t) (/ x y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -0.092) {
tmp = x / y;
} else if ((x / y) <= 8.5e-172) {
tmp = -2.0;
} else if ((x / y) <= 2.2e+88) {
tmp = 2.0 / t;
} else {
tmp = x / y;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x / y) <= (-0.092d0)) then
tmp = x / y
else if ((x / y) <= 8.5d-172) then
tmp = -2.0d0
else if ((x / y) <= 2.2d+88) then
tmp = 2.0d0 / t
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -0.092) {
tmp = x / y;
} else if ((x / y) <= 8.5e-172) {
tmp = -2.0;
} else if ((x / y) <= 2.2e+88) {
tmp = 2.0 / t;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x / y) <= -0.092: tmp = x / y elif (x / y) <= 8.5e-172: tmp = -2.0 elif (x / y) <= 2.2e+88: tmp = 2.0 / t else: tmp = x / y return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x / y) <= -0.092) tmp = Float64(x / y); elseif (Float64(x / y) <= 8.5e-172) tmp = -2.0; elseif (Float64(x / y) <= 2.2e+88) tmp = Float64(2.0 / t); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x / y) <= -0.092) tmp = x / y; elseif ((x / y) <= 8.5e-172) tmp = -2.0; elseif ((x / y) <= 2.2e+88) tmp = 2.0 / t; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -0.092], N[(x / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 8.5e-172], -2.0, If[LessEqual[N[(x / y), $MachinePrecision], 2.2e+88], N[(2.0 / t), $MachinePrecision], N[(x / y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -0.092:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 8.5 \cdot 10^{-172}:\\
\;\;\;\;-2\\
\mathbf{elif}\;\frac{x}{y} \leq 2.2 \cdot 10^{+88}:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if (/.f64 x y) < -0.091999999999999998 or 2.20000000000000009e88 < (/.f64 x y) Initial program 87.2%
Taylor expanded in x around inf
/-lowering-/.f6469.9%
Simplified69.9%
if -0.091999999999999998 < (/.f64 x y) < 8.49999999999999963e-172Initial program 88.9%
Simplified99.8%
Taylor expanded in x around 0
Simplified99.3%
Taylor expanded in t around inf
Simplified37.1%
if 8.49999999999999963e-172 < (/.f64 x y) < 2.20000000000000009e88Initial program 90.2%
Taylor expanded in t around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6482.2%
Simplified82.2%
Taylor expanded in z around inf
Simplified37.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (/ x y) (/ 2.0 t))))
(if (<= z -3e+142)
t_1
(if (<= z -1.05e-195)
(+ -2.0 (/ x y))
(if (<= z 7.2e-31) (/ 2.0 (* z t)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (2.0 / t);
double tmp;
if (z <= -3e+142) {
tmp = t_1;
} else if (z <= -1.05e-195) {
tmp = -2.0 + (x / y);
} else if (z <= 7.2e-31) {
tmp = 2.0 / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / y) + (2.0d0 / t)
if (z <= (-3d+142)) then
tmp = t_1
else if (z <= (-1.05d-195)) then
tmp = (-2.0d0) + (x / y)
else if (z <= 7.2d-31) then
tmp = 2.0d0 / (z * t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (2.0 / t);
double tmp;
if (z <= -3e+142) {
tmp = t_1;
} else if (z <= -1.05e-195) {
tmp = -2.0 + (x / y);
} else if (z <= 7.2e-31) {
tmp = 2.0 / (z * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + (2.0 / t) tmp = 0 if z <= -3e+142: tmp = t_1 elif z <= -1.05e-195: tmp = -2.0 + (x / y) elif z <= 7.2e-31: tmp = 2.0 / (z * t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) + Float64(2.0 / t)) tmp = 0.0 if (z <= -3e+142) tmp = t_1; elseif (z <= -1.05e-195) tmp = Float64(-2.0 + Float64(x / y)); elseif (z <= 7.2e-31) tmp = Float64(2.0 / Float64(z * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) + (2.0 / t); tmp = 0.0; if (z <= -3e+142) tmp = t_1; elseif (z <= -1.05e-195) tmp = -2.0 + (x / y); elseif (z <= 7.2e-31) tmp = 2.0 / (z * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e+142], t$95$1, If[LessEqual[z, -1.05e-195], N[(-2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e-31], N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + \frac{2}{t}\\
\mathbf{if}\;z \leq -3 \cdot 10^{+142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{-195}:\\
\;\;\;\;-2 + \frac{x}{y}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-31}:\\
\;\;\;\;\frac{2}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.99999999999999975e142 or 7.20000000000000007e-31 < z Initial program 75.7%
Taylor expanded in z around inf
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6499.0%
Simplified99.0%
Taylor expanded in t around 0
/-lowering-/.f6477.3%
Simplified77.3%
if -2.99999999999999975e142 < z < -1.05e-195Initial program 95.5%
Taylor expanded in t around inf
Simplified67.7%
if -1.05e-195 < z < 7.20000000000000007e-31Initial program 98.6%
Taylor expanded in t around 0
/-lowering-/.f64N/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
*-lft-identityN/A
associate-*l/N/A
+-lowering-+.f64N/A
associate-*l/N/A
*-lft-identityN/A
/-lowering-/.f6494.1%
Simplified94.1%
Taylor expanded in z around 0
/-lowering-/.f64N/A
*-lowering-*.f6479.4%
Simplified79.4%
Final simplification75.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ (/ x y) (+ -2.0 (/ 2.0 t)))))
(if (<= z -1.45e-16)
t_1
(if (<= z 1.25e-30) (+ (/ x y) (/ 2.0 (* z t))) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (-2.0 + (2.0 / t));
double tmp;
if (z <= -1.45e-16) {
tmp = t_1;
} else if (z <= 1.25e-30) {
tmp = (x / y) + (2.0 / (z * t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / y) + ((-2.0d0) + (2.0d0 / t))
if (z <= (-1.45d-16)) then
tmp = t_1
else if (z <= 1.25d-30) then
tmp = (x / y) + (2.0d0 / (z * t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (-2.0 + (2.0 / t));
double tmp;
if (z <= -1.45e-16) {
tmp = t_1;
} else if (z <= 1.25e-30) {
tmp = (x / y) + (2.0 / (z * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + (-2.0 + (2.0 / t)) tmp = 0 if z <= -1.45e-16: tmp = t_1 elif z <= 1.25e-30: tmp = (x / y) + (2.0 / (z * t)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) + Float64(-2.0 + Float64(2.0 / t))) tmp = 0.0 if (z <= -1.45e-16) tmp = t_1; elseif (z <= 1.25e-30) tmp = Float64(Float64(x / y) + Float64(2.0 / Float64(z * t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) + (-2.0 + (2.0 / t)); tmp = 0.0; if (z <= -1.45e-16) tmp = t_1; elseif (z <= 1.25e-30) tmp = (x / y) + (2.0 / (z * t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] + N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e-16], t$95$1, If[LessEqual[z, 1.25e-30], N[(N[(x / y), $MachinePrecision] + N[(2.0 / N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-30}:\\
\;\;\;\;\frac{x}{y} + \frac{2}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.4499999999999999e-16 or 1.24999999999999993e-30 < z Initial program 79.0%
Taylor expanded in z around inf
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6497.7%
Simplified97.7%
if -1.4499999999999999e-16 < z < 1.24999999999999993e-30Initial program 99.0%
Taylor expanded in z around 0
Simplified89.3%
Final simplification93.8%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (+ (/ x y) (+ -2.0 (/ 2.0 t))))) (if (<= z -2.3e-77) t_1 (if (<= z 7.5e-31) (+ -2.0 (/ (/ 2.0 z) t)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (-2.0 + (2.0 / t));
double tmp;
if (z <= -2.3e-77) {
tmp = t_1;
} else if (z <= 7.5e-31) {
tmp = -2.0 + ((2.0 / z) / t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / y) + ((-2.0d0) + (2.0d0 / t))
if (z <= (-2.3d-77)) then
tmp = t_1
else if (z <= 7.5d-31) then
tmp = (-2.0d0) + ((2.0d0 / z) / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (-2.0 + (2.0 / t));
double tmp;
if (z <= -2.3e-77) {
tmp = t_1;
} else if (z <= 7.5e-31) {
tmp = -2.0 + ((2.0 / z) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + (-2.0 + (2.0 / t)) tmp = 0 if z <= -2.3e-77: tmp = t_1 elif z <= 7.5e-31: tmp = -2.0 + ((2.0 / z) / t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) + Float64(-2.0 + Float64(2.0 / t))) tmp = 0.0 if (z <= -2.3e-77) tmp = t_1; elseif (z <= 7.5e-31) tmp = Float64(-2.0 + Float64(Float64(2.0 / z) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) + (-2.0 + (2.0 / t)); tmp = 0.0; if (z <= -2.3e-77) tmp = t_1; elseif (z <= 7.5e-31) tmp = -2.0 + ((2.0 / z) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] + N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.3e-77], t$95$1, If[LessEqual[z, 7.5e-31], N[(-2.0 + N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + \left(-2 + \frac{2}{t}\right)\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-31}:\\
\;\;\;\;-2 + \frac{\frac{2}{z}}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.29999999999999999e-77 or 7.49999999999999975e-31 < z Initial program 80.6%
Taylor expanded in z around inf
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6495.2%
Simplified95.2%
if -2.29999999999999999e-77 < z < 7.49999999999999975e-31Initial program 98.9%
Simplified98.8%
Taylor expanded in x around 0
Simplified80.0%
Taylor expanded in z around 0
/-lowering-/.f6480.0%
Simplified80.0%
Final simplification88.7%
(FPCore (x y z t) :precision binary64 (if (<= (/ x y) -250000.0) (+ -2.0 (/ x y)) (if (<= (/ x y) 1e+88) (+ -2.0 (/ 2.0 t)) (/ x y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -250000.0) {
tmp = -2.0 + (x / y);
} else if ((x / y) <= 1e+88) {
tmp = -2.0 + (2.0 / t);
} else {
tmp = x / y;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x / y) <= (-250000.0d0)) then
tmp = (-2.0d0) + (x / y)
else if ((x / y) <= 1d+88) then
tmp = (-2.0d0) + (2.0d0 / t)
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -250000.0) {
tmp = -2.0 + (x / y);
} else if ((x / y) <= 1e+88) {
tmp = -2.0 + (2.0 / t);
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x / y) <= -250000.0: tmp = -2.0 + (x / y) elif (x / y) <= 1e+88: tmp = -2.0 + (2.0 / t) else: tmp = x / y return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x / y) <= -250000.0) tmp = Float64(-2.0 + Float64(x / y)); elseif (Float64(x / y) <= 1e+88) tmp = Float64(-2.0 + Float64(2.0 / t)); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x / y) <= -250000.0) tmp = -2.0 + (x / y); elseif ((x / y) <= 1e+88) tmp = -2.0 + (2.0 / t); else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -250000.0], N[(-2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 1e+88], N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -250000:\\
\;\;\;\;-2 + \frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{+88}:\\
\;\;\;\;-2 + \frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if (/.f64 x y) < -2.5e5Initial program 91.4%
Taylor expanded in t around inf
Simplified62.3%
if -2.5e5 < (/.f64 x y) < 9.99999999999999959e87Initial program 89.5%
Simplified99.8%
Taylor expanded in x around 0
Simplified97.7%
Taylor expanded in z around inf
Simplified56.7%
if 9.99999999999999959e87 < (/.f64 x y) Initial program 82.0%
Taylor expanded in x around inf
/-lowering-/.f6480.5%
Simplified80.5%
Final simplification62.6%
(FPCore (x y z t) :precision binary64 (if (<= (/ x y) -480000000000.0) (/ x y) (if (<= (/ x y) 1e+88) (+ -2.0 (/ 2.0 t)) (/ x y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -480000000000.0) {
tmp = x / y;
} else if ((x / y) <= 1e+88) {
tmp = -2.0 + (2.0 / t);
} else {
tmp = x / y;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x / y) <= (-480000000000.0d0)) then
tmp = x / y
else if ((x / y) <= 1d+88) then
tmp = (-2.0d0) + (2.0d0 / t)
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x / y) <= -480000000000.0) {
tmp = x / y;
} else if ((x / y) <= 1e+88) {
tmp = -2.0 + (2.0 / t);
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x / y) <= -480000000000.0: tmp = x / y elif (x / y) <= 1e+88: tmp = -2.0 + (2.0 / t) else: tmp = x / y return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(x / y) <= -480000000000.0) tmp = Float64(x / y); elseif (Float64(x / y) <= 1e+88) tmp = Float64(-2.0 + Float64(2.0 / t)); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x / y) <= -480000000000.0) tmp = x / y; elseif ((x / y) <= 1e+88) tmp = -2.0 + (2.0 / t); else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(x / y), $MachinePrecision], -480000000000.0], N[(x / y), $MachinePrecision], If[LessEqual[N[(x / y), $MachinePrecision], 1e+88], N[(-2.0 + N[(2.0 / t), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -480000000000:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{+88}:\\
\;\;\;\;-2 + \frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if (/.f64 x y) < -4.8e11 or 9.99999999999999959e87 < (/.f64 x y) Initial program 87.1%
Taylor expanded in x around inf
/-lowering-/.f6470.6%
Simplified70.6%
if -4.8e11 < (/.f64 x y) < 9.99999999999999959e87Initial program 89.5%
Simplified99.8%
Taylor expanded in x around 0
Simplified97.7%
Taylor expanded in z around inf
Simplified56.7%
Final simplification62.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ -2.0 (/ x y))))
(if (<= t -55000000000000.0)
t_1
(if (<= t 1.3e-6) (/ (+ 2.0 (/ 2.0 z)) t) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = -2.0 + (x / y);
double tmp;
if (t <= -55000000000000.0) {
tmp = t_1;
} else if (t <= 1.3e-6) {
tmp = (2.0 + (2.0 / z)) / t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (-2.0d0) + (x / y)
if (t <= (-55000000000000.0d0)) then
tmp = t_1
else if (t <= 1.3d-6) then
tmp = (2.0d0 + (2.0d0 / z)) / t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = -2.0 + (x / y);
double tmp;
if (t <= -55000000000000.0) {
tmp = t_1;
} else if (t <= 1.3e-6) {
tmp = (2.0 + (2.0 / z)) / t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -2.0 + (x / y) tmp = 0 if t <= -55000000000000.0: tmp = t_1 elif t <= 1.3e-6: tmp = (2.0 + (2.0 / z)) / t else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(-2.0 + Float64(x / y)) tmp = 0.0 if (t <= -55000000000000.0) tmp = t_1; elseif (t <= 1.3e-6) tmp = Float64(Float64(2.0 + Float64(2.0 / z)) / t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -2.0 + (x / y); tmp = 0.0; if (t <= -55000000000000.0) tmp = t_1; elseif (t <= 1.3e-6) tmp = (2.0 + (2.0 / z)) / t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-2.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -55000000000000.0], t$95$1, If[LessEqual[t, 1.3e-6], N[(N[(2.0 + N[(2.0 / z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -2 + \frac{x}{y}\\
\mathbf{if}\;t \leq -55000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-6}:\\
\;\;\;\;\frac{2 + \frac{2}{z}}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.5e13 or 1.30000000000000005e-6 < t Initial program 75.7%
Taylor expanded in t around inf
Simplified78.8%
if -5.5e13 < t < 1.30000000000000005e-6Initial program 99.0%
Taylor expanded in t around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6480.6%
Simplified80.6%
Final simplification79.8%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (+ (/ x y) (/ 2.0 t)))) (if (<= z -5.8e-6) t_1 (if (<= z 5e-31) (+ -2.0 (/ (/ 2.0 z) t)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (2.0 / t);
double tmp;
if (z <= -5.8e-6) {
tmp = t_1;
} else if (z <= 5e-31) {
tmp = -2.0 + ((2.0 / z) / t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x / y) + (2.0d0 / t)
if (z <= (-5.8d-6)) then
tmp = t_1
else if (z <= 5d-31) then
tmp = (-2.0d0) + ((2.0d0 / z) / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x / y) + (2.0 / t);
double tmp;
if (z <= -5.8e-6) {
tmp = t_1;
} else if (z <= 5e-31) {
tmp = -2.0 + ((2.0 / z) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x / y) + (2.0 / t) tmp = 0 if z <= -5.8e-6: tmp = t_1 elif z <= 5e-31: tmp = -2.0 + ((2.0 / z) / t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x / y) + Float64(2.0 / t)) tmp = 0.0 if (z <= -5.8e-6) tmp = t_1; elseif (z <= 5e-31) tmp = Float64(-2.0 + Float64(Float64(2.0 / z) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x / y) + (2.0 / t); tmp = 0.0; if (z <= -5.8e-6) tmp = t_1; elseif (z <= 5e-31) tmp = -2.0 + ((2.0 / z) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x / y), $MachinePrecision] + N[(2.0 / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.8e-6], t$95$1, If[LessEqual[z, 5e-31], N[(-2.0 + N[(N[(2.0 / z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{y} + \frac{2}{t}\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-31}:\\
\;\;\;\;-2 + \frac{\frac{2}{z}}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.8000000000000004e-6 or 5e-31 < z Initial program 78.6%
Taylor expanded in z around inf
div-subN/A
sub-negN/A
*-inversesN/A
metadata-evalN/A
distribute-lft-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6498.4%
Simplified98.4%
Taylor expanded in t around 0
/-lowering-/.f6477.7%
Simplified77.7%
if -5.8000000000000004e-6 < z < 5e-31Initial program 99.0%
Simplified99.0%
Taylor expanded in x around 0
Simplified78.3%
Taylor expanded in z around 0
/-lowering-/.f6478.0%
Simplified78.0%
Final simplification77.8%
(FPCore (x y z t) :precision binary64 (if (<= t -1.0) -2.0 (if (<= t 4.5e-6) (/ 2.0 t) -2.0)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.0) {
tmp = -2.0;
} else if (t <= 4.5e-6) {
tmp = 2.0 / t;
} else {
tmp = -2.0;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-1.0d0)) then
tmp = -2.0d0
else if (t <= 4.5d-6) then
tmp = 2.0d0 / t
else
tmp = -2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.0) {
tmp = -2.0;
} else if (t <= 4.5e-6) {
tmp = 2.0 / t;
} else {
tmp = -2.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.0: tmp = -2.0 elif t <= 4.5e-6: tmp = 2.0 / t else: tmp = -2.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.0) tmp = -2.0; elseif (t <= 4.5e-6) tmp = Float64(2.0 / t); else tmp = -2.0; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.0) tmp = -2.0; elseif (t <= 4.5e-6) tmp = 2.0 / t; else tmp = -2.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.0], -2.0, If[LessEqual[t, 4.5e-6], N[(2.0 / t), $MachinePrecision], -2.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1:\\
\;\;\;\;-2\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-6}:\\
\;\;\;\;\frac{2}{t}\\
\mathbf{else}:\\
\;\;\;\;-2\\
\end{array}
\end{array}
if t < -1 or 4.50000000000000011e-6 < t Initial program 76.2%
Simplified99.8%
Taylor expanded in x around 0
Simplified57.1%
Taylor expanded in t around inf
Simplified35.0%
if -1 < t < 4.50000000000000011e-6Initial program 99.0%
Taylor expanded in t around 0
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-*r/N/A
metadata-evalN/A
/-lowering-/.f6480.3%
Simplified80.3%
Taylor expanded in z around inf
Simplified39.6%
(FPCore (x y z t) :precision binary64 -2.0)
double code(double x, double y, double z, double t) {
return -2.0;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = -2.0d0
end function
public static double code(double x, double y, double z, double t) {
return -2.0;
}
def code(x, y, z, t): return -2.0
function code(x, y, z, t) return -2.0 end
function tmp = code(x, y, z, t) tmp = -2.0; end
code[x_, y_, z_, t_] := -2.0
\begin{array}{l}
\\
-2
\end{array}
Initial program 88.5%
Simplified99.5%
Taylor expanded in x around 0
Simplified70.0%
Taylor expanded in t around inf
Simplified17.5%
(FPCore (x y z t) :precision binary64 (- (/ (+ (/ 2.0 z) 2.0) t) (- 2.0 (/ x y))))
double code(double x, double y, double z, double t) {
return (((2.0 / z) + 2.0) / t) - (2.0 - (x / y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (((2.0d0 / z) + 2.0d0) / t) - (2.0d0 - (x / y))
end function
public static double code(double x, double y, double z, double t) {
return (((2.0 / z) + 2.0) / t) - (2.0 - (x / y));
}
def code(x, y, z, t): return (((2.0 / z) + 2.0) / t) - (2.0 - (x / y))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(2.0 / z) + 2.0) / t) - Float64(2.0 - Float64(x / y))) end
function tmp = code(x, y, z, t) tmp = (((2.0 / z) + 2.0) / t) - (2.0 - (x / y)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(2.0 / z), $MachinePrecision] + 2.0), $MachinePrecision] / t), $MachinePrecision] - N[(2.0 - N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{2}{z} + 2}{t} - \left(2 - \frac{x}{y}\right)
\end{array}
herbie shell --seed 2024158
(FPCore (x y z t)
:name "Data.HashTable.ST.Basic:computeOverhead from hashtables-1.2.0.2"
:precision binary64
:alt
(! :herbie-platform default (- (/ (+ (/ 2 z) 2) t) (- 2 (/ x y))))
(+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))