
(FPCore (x y z t) :precision binary64 (+ x (* (- y x) (/ z t))))
double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
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 - x) * (z / t))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
def code(x, y, z, t): return x + ((y - x) * (z / t))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - x) * Float64(z / t))) end
function tmp = code(x, y, z, t) tmp = x + ((y - x) * (z / t)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - x\right) \cdot \frac{z}{t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (* (- y x) (/ z t))))
double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
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 - x) * (z / t))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
def code(x, y, z, t): return x + ((y - x) * (z / t))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - x) * Float64(z / t))) end
function tmp = code(x, y, z, t) tmp = x + ((y - x) * (z / t)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - x\right) \cdot \frac{z}{t}
\end{array}
(FPCore (x y z t) :precision binary64 (+ x (* (- y x) (/ z t))))
double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
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 - x) * (z / t))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - x) * (z / t));
}
def code(x, y, z, t): return x + ((y - x) * (z / t))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - x) * Float64(z / t))) end
function tmp = code(x, y, z, t) tmp = x + ((y - x) * (z / t)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - x\right) \cdot \frac{z}{t}
\end{array}
Initial program 98.3%
Final simplification98.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ z (- t)))) (t_2 (* y (/ z t))))
(if (<= (/ z t) -5e+213)
t_1
(if (<= (/ z t) -5e+89)
(/ (* y z) t)
(if (<= (/ z t) -2e+44)
t_1
(if (<= (/ z t) -5e-30)
t_2
(if (<= (/ z t) 1e-18) x (if (<= (/ z t) 2e+82) t_2 t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (z / -t);
double t_2 = y * (z / t);
double tmp;
if ((z / t) <= -5e+213) {
tmp = t_1;
} else if ((z / t) <= -5e+89) {
tmp = (y * z) / t;
} else if ((z / t) <= -2e+44) {
tmp = t_1;
} else if ((z / t) <= -5e-30) {
tmp = t_2;
} else if ((z / t) <= 1e-18) {
tmp = x;
} else if ((z / t) <= 2e+82) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = x * (z / -t)
t_2 = y * (z / t)
if ((z / t) <= (-5d+213)) then
tmp = t_1
else if ((z / t) <= (-5d+89)) then
tmp = (y * z) / t
else if ((z / t) <= (-2d+44)) then
tmp = t_1
else if ((z / t) <= (-5d-30)) then
tmp = t_2
else if ((z / t) <= 1d-18) then
tmp = x
else if ((z / t) <= 2d+82) then
tmp = t_2
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 * (z / -t);
double t_2 = y * (z / t);
double tmp;
if ((z / t) <= -5e+213) {
tmp = t_1;
} else if ((z / t) <= -5e+89) {
tmp = (y * z) / t;
} else if ((z / t) <= -2e+44) {
tmp = t_1;
} else if ((z / t) <= -5e-30) {
tmp = t_2;
} else if ((z / t) <= 1e-18) {
tmp = x;
} else if ((z / t) <= 2e+82) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (z / -t) t_2 = y * (z / t) tmp = 0 if (z / t) <= -5e+213: tmp = t_1 elif (z / t) <= -5e+89: tmp = (y * z) / t elif (z / t) <= -2e+44: tmp = t_1 elif (z / t) <= -5e-30: tmp = t_2 elif (z / t) <= 1e-18: tmp = x elif (z / t) <= 2e+82: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(z / Float64(-t))) t_2 = Float64(y * Float64(z / t)) tmp = 0.0 if (Float64(z / t) <= -5e+213) tmp = t_1; elseif (Float64(z / t) <= -5e+89) tmp = Float64(Float64(y * z) / t); elseif (Float64(z / t) <= -2e+44) tmp = t_1; elseif (Float64(z / t) <= -5e-30) tmp = t_2; elseif (Float64(z / t) <= 1e-18) tmp = x; elseif (Float64(z / t) <= 2e+82) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (z / -t); t_2 = y * (z / t); tmp = 0.0; if ((z / t) <= -5e+213) tmp = t_1; elseif ((z / t) <= -5e+89) tmp = (y * z) / t; elseif ((z / t) <= -2e+44) tmp = t_1; elseif ((z / t) <= -5e-30) tmp = t_2; elseif ((z / t) <= 1e-18) tmp = x; elseif ((z / t) <= 2e+82) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(z / (-t)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z / t), $MachinePrecision], -5e+213], t$95$1, If[LessEqual[N[(z / t), $MachinePrecision], -5e+89], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], -2e+44], t$95$1, If[LessEqual[N[(z / t), $MachinePrecision], -5e-30], t$95$2, If[LessEqual[N[(z / t), $MachinePrecision], 1e-18], x, If[LessEqual[N[(z / t), $MachinePrecision], 2e+82], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{z}{-t}\\
t_2 := y \cdot \frac{z}{t}\\
\mathbf{if}\;\frac{z}{t} \leq -5 \cdot 10^{+213}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{z}{t} \leq -5 \cdot 10^{+89}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{elif}\;\frac{z}{t} \leq -2 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{z}{t} \leq -5 \cdot 10^{-30}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;\frac{z}{t} \leq 10^{-18}:\\
\;\;\;\;x\\
\mathbf{elif}\;\frac{z}{t} \leq 2 \cdot 10^{+82}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 z t) < -4.9999999999999998e213 or -4.99999999999999983e89 < (/.f64 z t) < -2.0000000000000002e44 or 1.9999999999999999e82 < (/.f64 z t) Initial program 97.8%
+-commutative97.8%
fma-define97.8%
Simplified97.8%
Taylor expanded in y around 0 69.6%
mul-1-neg69.6%
unsub-neg69.6%
associate-/l*70.7%
*-rgt-identity70.7%
distribute-lft-out--70.7%
Simplified70.7%
Taylor expanded in z around inf 70.7%
associate-*r/70.7%
neg-mul-170.7%
Simplified70.7%
if -4.9999999999999998e213 < (/.f64 z t) < -4.99999999999999983e89Initial program 99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 95.0%
Taylor expanded in y around inf 65.1%
associate-*r/75.0%
Applied egg-rr75.0%
if -2.0000000000000002e44 < (/.f64 z t) < -4.99999999999999972e-30 or 1.0000000000000001e-18 < (/.f64 z t) < 1.9999999999999999e82Initial program 99.7%
+-commutative99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in z around inf 74.9%
Taylor expanded in y around inf 49.6%
clear-num49.5%
un-div-inv51.1%
Applied egg-rr51.1%
associate-/r/63.2%
Applied egg-rr63.2%
if -4.99999999999999972e-30 < (/.f64 z t) < 1.0000000000000001e-18Initial program 98.0%
+-commutative98.0%
fma-define98.0%
Simplified98.0%
Taylor expanded in z around 0 74.7%
Final simplification71.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ z (- t)))) (t_2 (* y (/ z t))))
(if (<= (/ z t) -5e+213)
(* z (/ x (- t)))
(if (<= (/ z t) -5e+89)
(/ (* y z) t)
(if (<= (/ z t) -2e+44)
t_1
(if (<= (/ z t) -5e-30)
t_2
(if (<= (/ z t) 1e-18) x (if (<= (/ z t) 2e+82) t_2 t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (z / -t);
double t_2 = y * (z / t);
double tmp;
if ((z / t) <= -5e+213) {
tmp = z * (x / -t);
} else if ((z / t) <= -5e+89) {
tmp = (y * z) / t;
} else if ((z / t) <= -2e+44) {
tmp = t_1;
} else if ((z / t) <= -5e-30) {
tmp = t_2;
} else if ((z / t) <= 1e-18) {
tmp = x;
} else if ((z / t) <= 2e+82) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = x * (z / -t)
t_2 = y * (z / t)
if ((z / t) <= (-5d+213)) then
tmp = z * (x / -t)
else if ((z / t) <= (-5d+89)) then
tmp = (y * z) / t
else if ((z / t) <= (-2d+44)) then
tmp = t_1
else if ((z / t) <= (-5d-30)) then
tmp = t_2
else if ((z / t) <= 1d-18) then
tmp = x
else if ((z / t) <= 2d+82) then
tmp = t_2
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 * (z / -t);
double t_2 = y * (z / t);
double tmp;
if ((z / t) <= -5e+213) {
tmp = z * (x / -t);
} else if ((z / t) <= -5e+89) {
tmp = (y * z) / t;
} else if ((z / t) <= -2e+44) {
tmp = t_1;
} else if ((z / t) <= -5e-30) {
tmp = t_2;
} else if ((z / t) <= 1e-18) {
tmp = x;
} else if ((z / t) <= 2e+82) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (z / -t) t_2 = y * (z / t) tmp = 0 if (z / t) <= -5e+213: tmp = z * (x / -t) elif (z / t) <= -5e+89: tmp = (y * z) / t elif (z / t) <= -2e+44: tmp = t_1 elif (z / t) <= -5e-30: tmp = t_2 elif (z / t) <= 1e-18: tmp = x elif (z / t) <= 2e+82: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(z / Float64(-t))) t_2 = Float64(y * Float64(z / t)) tmp = 0.0 if (Float64(z / t) <= -5e+213) tmp = Float64(z * Float64(x / Float64(-t))); elseif (Float64(z / t) <= -5e+89) tmp = Float64(Float64(y * z) / t); elseif (Float64(z / t) <= -2e+44) tmp = t_1; elseif (Float64(z / t) <= -5e-30) tmp = t_2; elseif (Float64(z / t) <= 1e-18) tmp = x; elseif (Float64(z / t) <= 2e+82) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (z / -t); t_2 = y * (z / t); tmp = 0.0; if ((z / t) <= -5e+213) tmp = z * (x / -t); elseif ((z / t) <= -5e+89) tmp = (y * z) / t; elseif ((z / t) <= -2e+44) tmp = t_1; elseif ((z / t) <= -5e-30) tmp = t_2; elseif ((z / t) <= 1e-18) tmp = x; elseif ((z / t) <= 2e+82) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(z / (-t)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z / t), $MachinePrecision], -5e+213], N[(z * N[(x / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], -5e+89], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], -2e+44], t$95$1, If[LessEqual[N[(z / t), $MachinePrecision], -5e-30], t$95$2, If[LessEqual[N[(z / t), $MachinePrecision], 1e-18], x, If[LessEqual[N[(z / t), $MachinePrecision], 2e+82], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{z}{-t}\\
t_2 := y \cdot \frac{z}{t}\\
\mathbf{if}\;\frac{z}{t} \leq -5 \cdot 10^{+213}:\\
\;\;\;\;z \cdot \frac{x}{-t}\\
\mathbf{elif}\;\frac{z}{t} \leq -5 \cdot 10^{+89}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{elif}\;\frac{z}{t} \leq -2 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{z}{t} \leq -5 \cdot 10^{-30}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;\frac{z}{t} \leq 10^{-18}:\\
\;\;\;\;x\\
\mathbf{elif}\;\frac{z}{t} \leq 2 \cdot 10^{+82}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 z t) < -4.9999999999999998e213Initial program 94.2%
+-commutative94.2%
fma-define94.2%
Simplified94.2%
Taylor expanded in z around inf 90.8%
Taylor expanded in y around 0 73.1%
mul-1-neg73.1%
distribute-frac-neg273.1%
Simplified73.1%
if -4.9999999999999998e213 < (/.f64 z t) < -4.99999999999999983e89Initial program 99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 95.0%
Taylor expanded in y around inf 65.1%
associate-*r/75.0%
Applied egg-rr75.0%
if -4.99999999999999983e89 < (/.f64 z t) < -2.0000000000000002e44 or 1.9999999999999999e82 < (/.f64 z t) Initial program 99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in y around 0 67.4%
mul-1-neg67.4%
unsub-neg67.4%
associate-/l*72.6%
*-rgt-identity72.6%
distribute-lft-out--72.6%
Simplified72.6%
Taylor expanded in z around inf 72.6%
associate-*r/72.6%
neg-mul-172.6%
Simplified72.6%
if -2.0000000000000002e44 < (/.f64 z t) < -4.99999999999999972e-30 or 1.0000000000000001e-18 < (/.f64 z t) < 1.9999999999999999e82Initial program 99.7%
+-commutative99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in z around inf 74.9%
Taylor expanded in y around inf 49.6%
clear-num49.5%
un-div-inv51.1%
Applied egg-rr51.1%
associate-/r/63.2%
Applied egg-rr63.2%
if -4.99999999999999972e-30 < (/.f64 z t) < 1.0000000000000001e-18Initial program 98.0%
+-commutative98.0%
fma-define98.0%
Simplified98.0%
Taylor expanded in z around 0 74.7%
Final simplification72.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (/ z (- t)))) (t_2 (* y (/ z t))))
(if (<= (/ z t) -5e+213)
(/ (* x z) (- t))
(if (<= (/ z t) -5e+89)
(/ (* y z) t)
(if (<= (/ z t) -2e+44)
t_1
(if (<= (/ z t) -5e-30)
t_2
(if (<= (/ z t) 1e-18) x (if (<= (/ z t) 2e+82) t_2 t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (z / -t);
double t_2 = y * (z / t);
double tmp;
if ((z / t) <= -5e+213) {
tmp = (x * z) / -t;
} else if ((z / t) <= -5e+89) {
tmp = (y * z) / t;
} else if ((z / t) <= -2e+44) {
tmp = t_1;
} else if ((z / t) <= -5e-30) {
tmp = t_2;
} else if ((z / t) <= 1e-18) {
tmp = x;
} else if ((z / t) <= 2e+82) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = x * (z / -t)
t_2 = y * (z / t)
if ((z / t) <= (-5d+213)) then
tmp = (x * z) / -t
else if ((z / t) <= (-5d+89)) then
tmp = (y * z) / t
else if ((z / t) <= (-2d+44)) then
tmp = t_1
else if ((z / t) <= (-5d-30)) then
tmp = t_2
else if ((z / t) <= 1d-18) then
tmp = x
else if ((z / t) <= 2d+82) then
tmp = t_2
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 * (z / -t);
double t_2 = y * (z / t);
double tmp;
if ((z / t) <= -5e+213) {
tmp = (x * z) / -t;
} else if ((z / t) <= -5e+89) {
tmp = (y * z) / t;
} else if ((z / t) <= -2e+44) {
tmp = t_1;
} else if ((z / t) <= -5e-30) {
tmp = t_2;
} else if ((z / t) <= 1e-18) {
tmp = x;
} else if ((z / t) <= 2e+82) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (z / -t) t_2 = y * (z / t) tmp = 0 if (z / t) <= -5e+213: tmp = (x * z) / -t elif (z / t) <= -5e+89: tmp = (y * z) / t elif (z / t) <= -2e+44: tmp = t_1 elif (z / t) <= -5e-30: tmp = t_2 elif (z / t) <= 1e-18: tmp = x elif (z / t) <= 2e+82: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(z / Float64(-t))) t_2 = Float64(y * Float64(z / t)) tmp = 0.0 if (Float64(z / t) <= -5e+213) tmp = Float64(Float64(x * z) / Float64(-t)); elseif (Float64(z / t) <= -5e+89) tmp = Float64(Float64(y * z) / t); elseif (Float64(z / t) <= -2e+44) tmp = t_1; elseif (Float64(z / t) <= -5e-30) tmp = t_2; elseif (Float64(z / t) <= 1e-18) tmp = x; elseif (Float64(z / t) <= 2e+82) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (z / -t); t_2 = y * (z / t); tmp = 0.0; if ((z / t) <= -5e+213) tmp = (x * z) / -t; elseif ((z / t) <= -5e+89) tmp = (y * z) / t; elseif ((z / t) <= -2e+44) tmp = t_1; elseif ((z / t) <= -5e-30) tmp = t_2; elseif ((z / t) <= 1e-18) tmp = x; elseif ((z / t) <= 2e+82) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(z / (-t)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z / t), $MachinePrecision], -5e+213], N[(N[(x * z), $MachinePrecision] / (-t)), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], -5e+89], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[N[(z / t), $MachinePrecision], -2e+44], t$95$1, If[LessEqual[N[(z / t), $MachinePrecision], -5e-30], t$95$2, If[LessEqual[N[(z / t), $MachinePrecision], 1e-18], x, If[LessEqual[N[(z / t), $MachinePrecision], 2e+82], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{z}{-t}\\
t_2 := y \cdot \frac{z}{t}\\
\mathbf{if}\;\frac{z}{t} \leq -5 \cdot 10^{+213}:\\
\;\;\;\;\frac{x \cdot z}{-t}\\
\mathbf{elif}\;\frac{z}{t} \leq -5 \cdot 10^{+89}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{elif}\;\frac{z}{t} \leq -2 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;\frac{z}{t} \leq -5 \cdot 10^{-30}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;\frac{z}{t} \leq 10^{-18}:\\
\;\;\;\;x\\
\mathbf{elif}\;\frac{z}{t} \leq 2 \cdot 10^{+82}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (/.f64 z t) < -4.9999999999999998e213Initial program 94.2%
+-commutative94.2%
fma-define94.2%
Simplified94.2%
Taylor expanded in z around inf 90.8%
Taylor expanded in y around 0 73.1%
mul-1-neg73.1%
distribute-frac-neg273.1%
Simplified73.1%
*-commutative73.1%
distribute-frac-neg273.1%
distribute-frac-neg73.1%
associate-*l/73.2%
Applied egg-rr73.2%
if -4.9999999999999998e213 < (/.f64 z t) < -4.99999999999999983e89Initial program 99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 95.0%
Taylor expanded in y around inf 65.1%
associate-*r/75.0%
Applied egg-rr75.0%
if -4.99999999999999983e89 < (/.f64 z t) < -2.0000000000000002e44 or 1.9999999999999999e82 < (/.f64 z t) Initial program 99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in y around 0 67.4%
mul-1-neg67.4%
unsub-neg67.4%
associate-/l*72.6%
*-rgt-identity72.6%
distribute-lft-out--72.6%
Simplified72.6%
Taylor expanded in z around inf 72.6%
associate-*r/72.6%
neg-mul-172.6%
Simplified72.6%
if -2.0000000000000002e44 < (/.f64 z t) < -4.99999999999999972e-30 or 1.0000000000000001e-18 < (/.f64 z t) < 1.9999999999999999e82Initial program 99.7%
+-commutative99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in z around inf 74.9%
Taylor expanded in y around inf 49.6%
clear-num49.5%
un-div-inv51.1%
Applied egg-rr51.1%
associate-/r/63.2%
Applied egg-rr63.2%
if -4.99999999999999972e-30 < (/.f64 z t) < 1.0000000000000001e-18Initial program 98.0%
+-commutative98.0%
fma-define98.0%
Simplified98.0%
Taylor expanded in z around 0 74.7%
Final simplification72.2%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ z t) -500000.0) (not (<= (/ z t) 1e-18))) (* z (/ (- y x) t)) (* x (- 1.0 (/ z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (((z / t) <= -500000.0) || !((z / t) <= 1e-18)) {
tmp = z * ((y - x) / t);
} else {
tmp = x * (1.0 - (z / t));
}
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 (((z / t) <= (-500000.0d0)) .or. (.not. ((z / t) <= 1d-18))) then
tmp = z * ((y - x) / t)
else
tmp = x * (1.0d0 - (z / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z / t) <= -500000.0) || !((z / t) <= 1e-18)) {
tmp = z * ((y - x) / t);
} else {
tmp = x * (1.0 - (z / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z / t) <= -500000.0) or not ((z / t) <= 1e-18): tmp = z * ((y - x) / t) else: tmp = x * (1.0 - (z / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z / t) <= -500000.0) || !(Float64(z / t) <= 1e-18)) tmp = Float64(z * Float64(Float64(y - x) / t)); else tmp = Float64(x * Float64(1.0 - Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z / t) <= -500000.0) || ~(((z / t) <= 1e-18))) tmp = z * ((y - x) / t); else tmp = x * (1.0 - (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z / t), $MachinePrecision], -500000.0], N[Not[LessEqual[N[(z / t), $MachinePrecision], 1e-18]], $MachinePrecision]], N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{z}{t} \leq -500000 \lor \neg \left(\frac{z}{t} \leq 10^{-18}\right):\\
\;\;\;\;z \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\
\end{array}
\end{array}
if (/.f64 z t) < -5e5 or 1.0000000000000001e-18 < (/.f64 z t) Initial program 98.5%
+-commutative98.5%
fma-define98.5%
Simplified98.5%
Taylor expanded in z around inf 90.9%
Taylor expanded in t around 0 93.0%
if -5e5 < (/.f64 z t) < 1.0000000000000001e-18Initial program 98.2%
+-commutative98.2%
fma-define98.1%
Simplified98.1%
Taylor expanded in y around 0 66.1%
mul-1-neg66.1%
unsub-neg66.1%
associate-/l*73.7%
*-rgt-identity73.7%
distribute-lft-out--73.7%
Simplified73.7%
Final simplification84.4%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ z t) -5000.0) (not (<= (/ z t) 1000000.0))) (* z (/ (- y x) t)) (+ x (* y (/ z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (((z / t) <= -5000.0) || !((z / t) <= 1000000.0)) {
tmp = z * ((y - x) / t);
} else {
tmp = x + (y * (z / t));
}
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 (((z / t) <= (-5000.0d0)) .or. (.not. ((z / t) <= 1000000.0d0))) then
tmp = z * ((y - x) / t)
else
tmp = x + (y * (z / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z / t) <= -5000.0) || !((z / t) <= 1000000.0)) {
tmp = z * ((y - x) / t);
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z / t) <= -5000.0) or not ((z / t) <= 1000000.0): tmp = z * ((y - x) / t) else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z / t) <= -5000.0) || !(Float64(z / t) <= 1000000.0)) tmp = Float64(z * Float64(Float64(y - x) / t)); else tmp = Float64(x + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z / t) <= -5000.0) || ~(((z / t) <= 1000000.0))) tmp = z * ((y - x) / t); else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z / t), $MachinePrecision], -5000.0], N[Not[LessEqual[N[(z / t), $MachinePrecision], 1000000.0]], $MachinePrecision]], N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{z}{t} \leq -5000 \lor \neg \left(\frac{z}{t} \leq 1000000\right):\\
\;\;\;\;z \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if (/.f64 z t) < -5e3 or 1e6 < (/.f64 z t) Initial program 98.4%
+-commutative98.4%
fma-define98.4%
Simplified98.4%
Taylor expanded in z around inf 91.5%
Taylor expanded in t around 0 93.7%
if -5e3 < (/.f64 z t) < 1e6Initial program 98.3%
Taylor expanded in y around inf 93.5%
associate-*r/97.0%
Simplified97.0%
Final simplification95.2%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ z t) -40.0) (not (<= (/ z t) 1000000.0))) (/ (- y x) (/ t z)) (+ x (* y (/ z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (((z / t) <= -40.0) || !((z / t) <= 1000000.0)) {
tmp = (y - x) / (t / z);
} else {
tmp = x + (y * (z / t));
}
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 (((z / t) <= (-40.0d0)) .or. (.not. ((z / t) <= 1000000.0d0))) then
tmp = (y - x) / (t / z)
else
tmp = x + (y * (z / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z / t) <= -40.0) || !((z / t) <= 1000000.0)) {
tmp = (y - x) / (t / z);
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z / t) <= -40.0) or not ((z / t) <= 1000000.0): tmp = (y - x) / (t / z) else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z / t) <= -40.0) || !(Float64(z / t) <= 1000000.0)) tmp = Float64(Float64(y - x) / Float64(t / z)); else tmp = Float64(x + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z / t) <= -40.0) || ~(((z / t) <= 1000000.0))) tmp = (y - x) / (t / z); else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z / t), $MachinePrecision], -40.0], N[Not[LessEqual[N[(z / t), $MachinePrecision], 1000000.0]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{z}{t} \leq -40 \lor \neg \left(\frac{z}{t} \leq 1000000\right):\\
\;\;\;\;\frac{y - x}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if (/.f64 z t) < -40 or 1e6 < (/.f64 z t) Initial program 98.4%
+-commutative98.4%
fma-define98.4%
Simplified98.4%
Taylor expanded in z around inf 90.9%
sub-div93.1%
associate-*r/91.0%
*-commutative91.0%
associate-/l*97.3%
clear-num97.2%
un-div-inv97.3%
Applied egg-rr97.3%
if -40 < (/.f64 z t) < 1e6Initial program 98.3%
Taylor expanded in y around inf 94.2%
associate-*r/97.6%
Simplified97.6%
Final simplification97.5%
(FPCore (x y z t) :precision binary64 (if (or (<= (/ z t) -5e-30) (not (<= (/ z t) 1e-18))) (* y (/ z t)) x))
double code(double x, double y, double z, double t) {
double tmp;
if (((z / t) <= -5e-30) || !((z / t) <= 1e-18)) {
tmp = y * (z / t);
} else {
tmp = x;
}
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 (((z / t) <= (-5d-30)) .or. (.not. ((z / t) <= 1d-18))) then
tmp = y * (z / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z / t) <= -5e-30) || !((z / t) <= 1e-18)) {
tmp = y * (z / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z / t) <= -5e-30) or not ((z / t) <= 1e-18): tmp = y * (z / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z / t) <= -5e-30) || !(Float64(z / t) <= 1e-18)) tmp = Float64(y * Float64(z / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z / t) <= -5e-30) || ~(((z / t) <= 1e-18))) tmp = y * (z / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z / t), $MachinePrecision], -5e-30], N[Not[LessEqual[N[(z / t), $MachinePrecision], 1e-18]], $MachinePrecision]], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{z}{t} \leq -5 \cdot 10^{-30} \lor \neg \left(\frac{z}{t} \leq 10^{-18}\right):\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if (/.f64 z t) < -4.99999999999999972e-30 or 1.0000000000000001e-18 < (/.f64 z t) Initial program 98.6%
+-commutative98.6%
fma-define98.6%
Simplified98.6%
Taylor expanded in z around inf 88.5%
Taylor expanded in y around inf 49.1%
clear-num49.1%
un-div-inv50.0%
Applied egg-rr50.0%
associate-/r/55.4%
Applied egg-rr55.4%
if -4.99999999999999972e-30 < (/.f64 z t) < 1.0000000000000001e-18Initial program 98.0%
+-commutative98.0%
fma-define98.0%
Simplified98.0%
Taylor expanded in z around 0 74.7%
Final simplification63.5%
(FPCore (x y z t) :precision binary64 (if (<= y -3.7e+127) (/ (* y z) t) (if (<= y 2.4e+93) (* x (- 1.0 (/ z t))) (* y (/ z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.7e+127) {
tmp = (y * z) / t;
} else if (y <= 2.4e+93) {
tmp = x * (1.0 - (z / t));
} else {
tmp = y * (z / t);
}
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 (y <= (-3.7d+127)) then
tmp = (y * z) / t
else if (y <= 2.4d+93) then
tmp = x * (1.0d0 - (z / t))
else
tmp = y * (z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.7e+127) {
tmp = (y * z) / t;
} else if (y <= 2.4e+93) {
tmp = x * (1.0 - (z / t));
} else {
tmp = y * (z / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.7e+127: tmp = (y * z) / t elif y <= 2.4e+93: tmp = x * (1.0 - (z / t)) else: tmp = y * (z / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.7e+127) tmp = Float64(Float64(y * z) / t); elseif (y <= 2.4e+93) tmp = Float64(x * Float64(1.0 - Float64(z / t))); else tmp = Float64(y * Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.7e+127) tmp = (y * z) / t; elseif (y <= 2.4e+93) tmp = x * (1.0 - (z / t)); else tmp = y * (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.7e+127], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[y, 2.4e+93], N[(x * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{+127}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+93}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if y < -3.6999999999999998e127Initial program 97.5%
+-commutative97.5%
fma-define97.5%
Simplified97.5%
Taylor expanded in z around inf 71.5%
Taylor expanded in y around inf 69.2%
associate-*r/78.2%
Applied egg-rr78.2%
if -3.6999999999999998e127 < y < 2.4000000000000001e93Initial program 98.6%
+-commutative98.6%
fma-define98.6%
Simplified98.6%
Taylor expanded in y around 0 72.7%
mul-1-neg72.7%
unsub-neg72.7%
associate-/l*80.1%
*-rgt-identity80.1%
distribute-lft-out--80.1%
Simplified80.1%
if 2.4000000000000001e93 < y Initial program 98.1%
+-commutative98.1%
fma-define98.1%
Simplified98.1%
Taylor expanded in z around inf 60.8%
Taylor expanded in y around inf 58.1%
clear-num58.0%
un-div-inv60.3%
Applied egg-rr60.3%
associate-/r/65.8%
Applied egg-rr65.8%
Final simplification76.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -6.9e-71) (not (<= y 3.6e+28))) (* z (/ y t)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.9e-71) || !(y <= 3.6e+28)) {
tmp = z * (y / t);
} else {
tmp = x;
}
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 ((y <= (-6.9d-71)) .or. (.not. (y <= 3.6d+28))) then
tmp = z * (y / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.9e-71) || !(y <= 3.6e+28)) {
tmp = z * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -6.9e-71) or not (y <= 3.6e+28): tmp = z * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -6.9e-71) || !(y <= 3.6e+28)) tmp = Float64(z * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -6.9e-71) || ~((y <= 3.6e+28))) tmp = z * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -6.9e-71], N[Not[LessEqual[y, 3.6e+28]], $MachinePrecision]], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.9 \cdot 10^{-71} \lor \neg \left(y \leq 3.6 \cdot 10^{+28}\right):\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.9000000000000003e-71 or 3.5999999999999999e28 < y Initial program 98.5%
+-commutative98.5%
fma-define98.5%
Simplified98.5%
Taylor expanded in z around inf 66.6%
Taylor expanded in y around inf 56.9%
if -6.9000000000000003e-71 < y < 3.5999999999999999e28Initial program 98.1%
+-commutative98.1%
fma-define98.1%
Simplified98.1%
Taylor expanded in z around 0 45.2%
Final simplification52.1%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 98.3%
+-commutative98.3%
fma-define98.3%
Simplified98.3%
Taylor expanded in z around 0 33.8%
Final simplification33.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (- y x) (/ z t))) (t_2 (+ x (/ (- y x) (/ t z)))))
(if (< t_1 -1013646692435.8867)
t_2
(if (< t_1 0.0) (+ x (/ (* (- y x) z) t)) t_2))))
double code(double x, double y, double z, double t) {
double t_1 = (y - x) * (z / t);
double t_2 = x + ((y - x) / (t / z));
double tmp;
if (t_1 < -1013646692435.8867) {
tmp = t_2;
} else if (t_1 < 0.0) {
tmp = x + (((y - x) * z) / t);
} 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 = (y - x) * (z / t)
t_2 = x + ((y - x) / (t / z))
if (t_1 < (-1013646692435.8867d0)) then
tmp = t_2
else if (t_1 < 0.0d0) then
tmp = x + (((y - x) * z) / t)
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 = (y - x) * (z / t);
double t_2 = x + ((y - x) / (t / z));
double tmp;
if (t_1 < -1013646692435.8867) {
tmp = t_2;
} else if (t_1 < 0.0) {
tmp = x + (((y - x) * z) / t);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = (y - x) * (z / t) t_2 = x + ((y - x) / (t / z)) tmp = 0 if t_1 < -1013646692435.8867: tmp = t_2 elif t_1 < 0.0: tmp = x + (((y - x) * z) / t) else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(y - x) * Float64(z / t)) t_2 = Float64(x + Float64(Float64(y - x) / Float64(t / z))) tmp = 0.0 if (t_1 < -1013646692435.8867) tmp = t_2; elseif (t_1 < 0.0) tmp = Float64(x + Float64(Float64(Float64(y - x) * z) / t)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (y - x) * (z / t); t_2 = x + ((y - x) / (t / z)); tmp = 0.0; if (t_1 < -1013646692435.8867) tmp = t_2; elseif (t_1 < 0.0) tmp = x + (((y - x) * z) / t); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$1, -1013646692435.8867], t$95$2, If[Less[t$95$1, 0.0], N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - x\right) \cdot \frac{z}{t}\\
t_2 := x + \frac{y - x}{\frac{t}{z}}\\
\mathbf{if}\;t\_1 < -1013646692435.8867:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 < 0:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024076
(FPCore (x y z t)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:tickPosition from plot-0.2.3.4"
:precision binary64
:alt
(if (< (* (- y x) (/ z t)) -1013646692435.8867) (+ x (/ (- y x) (/ t z))) (if (< (* (- y x) (/ z t)) 0.0) (+ x (/ (* (- y x) z) t)) (+ x (/ (- y x) (/ t z)))))
(+ x (* (- y x) (/ z t))))