
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 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 = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * exp(((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.exp(((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.exp(((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * exp(Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 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 = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * exp(((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.exp(((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.exp(((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * exp(Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * exp(((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot e^{\frac{t \cdot t}{2}}
\end{array}
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* (* z 2.0) (pow (exp (* 2.0 t)) (* 0.5 t))))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt(((z * 2.0) * pow(exp((2.0 * t)), (0.5 * 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 * 0.5d0) - y) * sqrt(((z * 2.0d0) * (exp((2.0d0 * t)) ** (0.5d0 * t))))
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.sqrt(((z * 2.0) * Math.pow(Math.exp((2.0 * t)), (0.5 * t))));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt(((z * 2.0) * math.pow(math.exp((2.0 * t)), (0.5 * t))))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(z * 2.0) * (exp(Float64(2.0 * t)) ^ Float64(0.5 * t))))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt(((z * 2.0) * (exp((2.0 * t)) ^ (0.5 * t)))); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[Power[N[Exp[N[(2.0 * t), $MachinePrecision]], $MachinePrecision], N[(0.5 * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z \cdot 2\right) \cdot {\left(e^{2 \cdot t}\right)}^{\left(0.5 \cdot t\right)}}
\end{array}
Initial program 99.1%
associate-*l*99.8%
remove-double-neg99.8%
remove-double-neg99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
Simplified99.8%
pow299.8%
pow-exp99.8%
add-sqr-sqrt99.8%
unpow-prod-down99.8%
pow1/299.8%
pow-unpow99.8%
*-commutative99.8%
pow1/299.8%
pow-unpow99.8%
*-commutative99.8%
pow-prod-down99.8%
pow299.8%
*-commutative99.8%
Applied egg-rr99.8%
*-commutative99.8%
Simplified99.8%
add-exp-log99.8%
log-pow99.8%
add-log-exp99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))))
(if (<= t 1.3e+15)
(* (- (* x 0.5) y) t_1)
(if (<= t 1.02e+65)
(sqrt (* (* z 2.0) (* y (- y x))))
(if (<= t 1.05e+136)
(* t_1 (* y (+ (* 0.5 (/ x y)) -1.0)))
(if (<= t 1.76e+174)
(* y (sqrt (* (* z 2.0) (pow (+ t 1.0) t))))
(* t_1 (* x (- 0.5 (/ y x))))))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if (t <= 1.3e+15) {
tmp = ((x * 0.5) - y) * t_1;
} else if (t <= 1.02e+65) {
tmp = sqrt(((z * 2.0) * (y * (y - x))));
} else if (t <= 1.05e+136) {
tmp = t_1 * (y * ((0.5 * (x / y)) + -1.0));
} else if (t <= 1.76e+174) {
tmp = y * sqrt(((z * 2.0) * pow((t + 1.0), t)));
} else {
tmp = t_1 * (x * (0.5 - (y / 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) :: t_1
real(8) :: tmp
t_1 = sqrt((z * 2.0d0))
if (t <= 1.3d+15) then
tmp = ((x * 0.5d0) - y) * t_1
else if (t <= 1.02d+65) then
tmp = sqrt(((z * 2.0d0) * (y * (y - x))))
else if (t <= 1.05d+136) then
tmp = t_1 * (y * ((0.5d0 * (x / y)) + (-1.0d0)))
else if (t <= 1.76d+174) then
tmp = y * sqrt(((z * 2.0d0) * ((t + 1.0d0) ** t)))
else
tmp = t_1 * (x * (0.5d0 - (y / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((z * 2.0));
double tmp;
if (t <= 1.3e+15) {
tmp = ((x * 0.5) - y) * t_1;
} else if (t <= 1.02e+65) {
tmp = Math.sqrt(((z * 2.0) * (y * (y - x))));
} else if (t <= 1.05e+136) {
tmp = t_1 * (y * ((0.5 * (x / y)) + -1.0));
} else if (t <= 1.76e+174) {
tmp = y * Math.sqrt(((z * 2.0) * Math.pow((t + 1.0), t)));
} else {
tmp = t_1 * (x * (0.5 - (y / x)));
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if t <= 1.3e+15: tmp = ((x * 0.5) - y) * t_1 elif t <= 1.02e+65: tmp = math.sqrt(((z * 2.0) * (y * (y - x)))) elif t <= 1.05e+136: tmp = t_1 * (y * ((0.5 * (x / y)) + -1.0)) elif t <= 1.76e+174: tmp = y * math.sqrt(((z * 2.0) * math.pow((t + 1.0), t))) else: tmp = t_1 * (x * (0.5 - (y / x))) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (t <= 1.3e+15) tmp = Float64(Float64(Float64(x * 0.5) - y) * t_1); elseif (t <= 1.02e+65) tmp = sqrt(Float64(Float64(z * 2.0) * Float64(y * Float64(y - x)))); elseif (t <= 1.05e+136) tmp = Float64(t_1 * Float64(y * Float64(Float64(0.5 * Float64(x / y)) + -1.0))); elseif (t <= 1.76e+174) tmp = Float64(y * sqrt(Float64(Float64(z * 2.0) * (Float64(t + 1.0) ^ t)))); else tmp = Float64(t_1 * Float64(x * Float64(0.5 - Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if (t <= 1.3e+15) tmp = ((x * 0.5) - y) * t_1; elseif (t <= 1.02e+65) tmp = sqrt(((z * 2.0) * (y * (y - x)))); elseif (t <= 1.05e+136) tmp = t_1 * (y * ((0.5 * (x / y)) + -1.0)); elseif (t <= 1.76e+174) tmp = y * sqrt(((z * 2.0) * ((t + 1.0) ^ t))); else tmp = t_1 * (x * (0.5 - (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 1.3e+15], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[t, 1.02e+65], N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(y * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.05e+136], N[(t$95$1 * N[(y * N[(N[(0.5 * N[(x / y), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.76e+174], N[(y * N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[Power[N[(t + 1.0), $MachinePrecision], t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(x * N[(0.5 - N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;t \leq 1.3 \cdot 10^{+15}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot t\_1\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{+65}:\\
\;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \left(y \cdot \left(y - x\right)\right)}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+136}:\\
\;\;\;\;t\_1 \cdot \left(y \cdot \left(0.5 \cdot \frac{x}{y} + -1\right)\right)\\
\mathbf{elif}\;t \leq 1.76 \cdot 10^{+174}:\\
\;\;\;\;y \cdot \sqrt{\left(z \cdot 2\right) \cdot {\left(t + 1\right)}^{t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(x \cdot \left(0.5 - \frac{y}{x}\right)\right)\\
\end{array}
\end{array}
if t < 1.3e15Initial program 98.9%
associate-*l*99.8%
remove-double-neg99.8%
remove-double-neg99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 69.4%
if 1.3e15 < t < 1.02000000000000005e65Initial program 100.0%
Taylor expanded in t around 0 3.8%
add-sqr-sqrt2.6%
sqrt-unprod21.4%
*-commutative21.4%
*-commutative21.4%
swap-sqr40.6%
add-sqr-sqrt40.6%
pow240.6%
fmm-def40.6%
Applied egg-rr40.6%
fmm-undef40.6%
*-commutative40.6%
Simplified40.6%
Taylor expanded in x around 0 30.6%
+-commutative30.6%
unpow230.6%
associate-*r*30.6%
distribute-rgt-in40.6%
mul-1-neg40.6%
unsub-neg40.6%
Simplified40.6%
if 1.02000000000000005e65 < t < 1.05e136Initial program 100.0%
Taylor expanded in t around 0 12.7%
Taylor expanded in y around inf 36.1%
if 1.05e136 < t < 1.76e174Initial program 100.0%
exp-sqrt100.0%
pow-exp100.0%
pow1/2100.0%
pow-pow100.0%
Applied egg-rr100.0%
Taylor expanded in x around 0 50.0%
mul-1-neg50.0%
Simplified50.0%
Taylor expanded in t around 0 50.0%
+-commutative50.0%
Simplified50.0%
pow150.0%
associate-*l*50.0%
add-sqr-sqrt30.0%
sqrt-unprod50.0%
sqr-neg50.0%
sqrt-unprod40.0%
add-sqr-sqrt50.0%
pow1/250.0%
pow-unpow50.0%
pow-prod-down50.0%
Applied egg-rr50.0%
unpow150.0%
unpow1/250.0%
Simplified50.0%
if 1.76e174 < t Initial program 100.0%
Taylor expanded in t around 0 12.0%
Taylor expanded in x around inf 23.7%
mul-1-neg23.7%
unsub-neg23.7%
Simplified23.7%
Final simplification61.7%
(FPCore (x y z t) :precision binary64 (if (or (<= t 9.5) (not (<= t 1.35e+154))) (* (- (* x 0.5) y) (sqrt (* (* z 2.0) (fma t t 1.0)))) (* y (- (sqrt (* (* z 2.0) (pow (+ t 1.0) t)))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= 9.5) || !(t <= 1.35e+154)) {
tmp = ((x * 0.5) - y) * sqrt(((z * 2.0) * fma(t, t, 1.0)));
} else {
tmp = y * -sqrt(((z * 2.0) * pow((t + 1.0), t)));
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if ((t <= 9.5) || !(t <= 1.35e+154)) tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(z * 2.0) * fma(t, t, 1.0)))); else tmp = Float64(y * Float64(-sqrt(Float64(Float64(z * 2.0) * (Float64(t + 1.0) ^ t))))); end return tmp end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, 9.5], N[Not[LessEqual[t, 1.35e+154]], $MachinePrecision]], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(t * t + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y * (-N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[Power[N[(t + 1.0), $MachinePrecision], t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9.5 \lor \neg \left(t \leq 1.35 \cdot 10^{+154}\right):\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z \cdot 2\right) \cdot \mathsf{fma}\left(t, t, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-\sqrt{\left(z \cdot 2\right) \cdot {\left(t + 1\right)}^{t}}\right)\\
\end{array}
\end{array}
if t < 9.5 or 1.35000000000000003e154 < t Initial program 99.8%
associate-*l*99.8%
remove-double-neg99.8%
remove-double-neg99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 90.7%
+-commutative90.7%
unpow290.7%
fma-define90.7%
Simplified90.7%
if 9.5 < t < 1.35000000000000003e154Initial program 94.2%
exp-sqrt94.2%
pow-exp94.3%
pow1/294.3%
pow-pow94.3%
Applied egg-rr94.3%
Taylor expanded in x around 0 78.7%
mul-1-neg78.7%
Simplified78.7%
Taylor expanded in t around 0 73.0%
+-commutative73.0%
Simplified73.0%
associate-*l*79.1%
distribute-lft-neg-out79.1%
pow1/279.1%
pow-unpow79.1%
pow-prod-down79.1%
Applied egg-rr79.1%
distribute-lft-neg-in79.1%
unpow1/279.1%
Simplified79.1%
Final simplification89.3%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* (* z 2.0) (exp (* 2.0 (* t (* 0.5 t))))))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt(((z * 2.0) * exp((2.0 * (t * (0.5 * 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 * 0.5d0) - y) * sqrt(((z * 2.0d0) * exp((2.0d0 * (t * (0.5d0 * t))))))
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.sqrt(((z * 2.0) * Math.exp((2.0 * (t * (0.5 * t))))));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt(((z * 2.0) * math.exp((2.0 * (t * (0.5 * t))))))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(Float64(z * 2.0) * exp(Float64(2.0 * Float64(t * Float64(0.5 * t))))))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt(((z * 2.0) * exp((2.0 * (t * (0.5 * t)))))); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[Exp[N[(2.0 * N[(t * N[(0.5 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{\left(z \cdot 2\right) \cdot e^{2 \cdot \left(t \cdot \left(0.5 \cdot t\right)\right)}}
\end{array}
Initial program 99.1%
associate-*l*99.8%
remove-double-neg99.8%
remove-double-neg99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
Simplified99.8%
pow299.8%
pow-exp99.8%
add-sqr-sqrt99.8%
unpow-prod-down99.8%
pow1/299.8%
pow-unpow99.8%
*-commutative99.8%
pow1/299.8%
pow-unpow99.8%
*-commutative99.8%
pow-prod-down99.8%
pow299.8%
*-commutative99.8%
Applied egg-rr99.8%
*-commutative99.8%
Simplified99.8%
add-exp-log99.8%
log-pow99.8%
add-log-exp99.8%
Applied egg-rr99.8%
pow-exp99.8%
associate-*l*99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (if (<= t 9.5) (* (- (* x 0.5) y) (sqrt (* z 2.0))) (* y (- (sqrt (* (* z 2.0) (pow (+ t 1.0) t)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 9.5) {
tmp = ((x * 0.5) - y) * sqrt((z * 2.0));
} else {
tmp = y * -sqrt(((z * 2.0) * pow((t + 1.0), 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 (t <= 9.5d0) then
tmp = ((x * 0.5d0) - y) * sqrt((z * 2.0d0))
else
tmp = y * -sqrt(((z * 2.0d0) * ((t + 1.0d0) ** t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 9.5) {
tmp = ((x * 0.5) - y) * Math.sqrt((z * 2.0));
} else {
tmp = y * -Math.sqrt(((z * 2.0) * Math.pow((t + 1.0), t)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 9.5: tmp = ((x * 0.5) - y) * math.sqrt((z * 2.0)) else: tmp = y * -math.sqrt(((z * 2.0) * math.pow((t + 1.0), t))) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 9.5) tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))); else tmp = Float64(y * Float64(-sqrt(Float64(Float64(z * 2.0) * (Float64(t + 1.0) ^ t))))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 9.5) tmp = ((x * 0.5) - y) * sqrt((z * 2.0)); else tmp = y * -sqrt(((z * 2.0) * ((t + 1.0) ^ t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 9.5], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(y * (-N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[Power[N[(t + 1.0), $MachinePrecision], t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9.5:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-\sqrt{\left(z \cdot 2\right) \cdot {\left(t + 1\right)}^{t}}\right)\\
\end{array}
\end{array}
if t < 9.5Initial program 99.8%
associate-*l*99.8%
remove-double-neg99.8%
remove-double-neg99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 70.8%
if 9.5 < t Initial program 97.0%
exp-sqrt97.0%
pow-exp97.1%
pow1/297.1%
pow-pow97.1%
Applied egg-rr97.1%
Taylor expanded in x around 0 74.5%
mul-1-neg74.5%
Simplified74.5%
Taylor expanded in t around 0 71.5%
+-commutative71.5%
Simplified71.5%
associate-*l*76.3%
distribute-lft-neg-out76.3%
pow1/276.3%
pow-unpow76.3%
pow-prod-down76.3%
Applied egg-rr76.3%
distribute-lft-neg-in76.3%
unpow1/276.3%
Simplified76.3%
Final simplification72.1%
(FPCore (x y z t) :precision binary64 (* (exp (/ (* t t) 2.0)) (* (- (* x 0.5) y) (sqrt (* z 2.0)))))
double code(double x, double y, double z, double t) {
return exp(((t * t) / 2.0)) * (((x * 0.5) - y) * sqrt((z * 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 = exp(((t * t) / 2.0d0)) * (((x * 0.5d0) - y) * sqrt((z * 2.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return Math.exp(((t * t) / 2.0)) * (((x * 0.5) - y) * Math.sqrt((z * 2.0)));
}
def code(x, y, z, t): return math.exp(((t * t) / 2.0)) * (((x * 0.5) - y) * math.sqrt((z * 2.0)))
function code(x, y, z, t) return Float64(exp(Float64(Float64(t * t) / 2.0)) * Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0)))) end
function tmp = code(x, y, z, t) tmp = exp(((t * t) / 2.0)) * (((x * 0.5) - y) * sqrt((z * 2.0))); end
code[x_, y_, z_, t_] := N[(N[Exp[N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{\frac{t \cdot t}{2}} \cdot \left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right)
\end{array}
Initial program 99.1%
Final simplification99.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))))
(if (<= t 1.6e+14)
(* (- (* x 0.5) y) t_1)
(if (<= t 4.4e+64)
(sqrt (* (* z 2.0) (* y (- y x))))
(if (<= t 1.85e+174)
(* t_1 (* y (+ (* 0.5 (/ x y)) -1.0)))
(* t_1 (* x (- 0.5 (/ y x)))))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if (t <= 1.6e+14) {
tmp = ((x * 0.5) - y) * t_1;
} else if (t <= 4.4e+64) {
tmp = sqrt(((z * 2.0) * (y * (y - x))));
} else if (t <= 1.85e+174) {
tmp = t_1 * (y * ((0.5 * (x / y)) + -1.0));
} else {
tmp = t_1 * (x * (0.5 - (y / 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) :: t_1
real(8) :: tmp
t_1 = sqrt((z * 2.0d0))
if (t <= 1.6d+14) then
tmp = ((x * 0.5d0) - y) * t_1
else if (t <= 4.4d+64) then
tmp = sqrt(((z * 2.0d0) * (y * (y - x))))
else if (t <= 1.85d+174) then
tmp = t_1 * (y * ((0.5d0 * (x / y)) + (-1.0d0)))
else
tmp = t_1 * (x * (0.5d0 - (y / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((z * 2.0));
double tmp;
if (t <= 1.6e+14) {
tmp = ((x * 0.5) - y) * t_1;
} else if (t <= 4.4e+64) {
tmp = Math.sqrt(((z * 2.0) * (y * (y - x))));
} else if (t <= 1.85e+174) {
tmp = t_1 * (y * ((0.5 * (x / y)) + -1.0));
} else {
tmp = t_1 * (x * (0.5 - (y / x)));
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if t <= 1.6e+14: tmp = ((x * 0.5) - y) * t_1 elif t <= 4.4e+64: tmp = math.sqrt(((z * 2.0) * (y * (y - x)))) elif t <= 1.85e+174: tmp = t_1 * (y * ((0.5 * (x / y)) + -1.0)) else: tmp = t_1 * (x * (0.5 - (y / x))) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (t <= 1.6e+14) tmp = Float64(Float64(Float64(x * 0.5) - y) * t_1); elseif (t <= 4.4e+64) tmp = sqrt(Float64(Float64(z * 2.0) * Float64(y * Float64(y - x)))); elseif (t <= 1.85e+174) tmp = Float64(t_1 * Float64(y * Float64(Float64(0.5 * Float64(x / y)) + -1.0))); else tmp = Float64(t_1 * Float64(x * Float64(0.5 - Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if (t <= 1.6e+14) tmp = ((x * 0.5) - y) * t_1; elseif (t <= 4.4e+64) tmp = sqrt(((z * 2.0) * (y * (y - x)))); elseif (t <= 1.85e+174) tmp = t_1 * (y * ((0.5 * (x / y)) + -1.0)); else tmp = t_1 * (x * (0.5 - (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 1.6e+14], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[t, 4.4e+64], N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(y * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 1.85e+174], N[(t$95$1 * N[(y * N[(N[(0.5 * N[(x / y), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[(x * N[(0.5 - N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;t \leq 1.6 \cdot 10^{+14}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot t\_1\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{+64}:\\
\;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \left(y \cdot \left(y - x\right)\right)}\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+174}:\\
\;\;\;\;t\_1 \cdot \left(y \cdot \left(0.5 \cdot \frac{x}{y} + -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(x \cdot \left(0.5 - \frac{y}{x}\right)\right)\\
\end{array}
\end{array}
if t < 1.6e14Initial program 98.9%
associate-*l*99.8%
remove-double-neg99.8%
remove-double-neg99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 69.4%
if 1.6e14 < t < 4.40000000000000004e64Initial program 100.0%
Taylor expanded in t around 0 3.8%
add-sqr-sqrt2.6%
sqrt-unprod21.4%
*-commutative21.4%
*-commutative21.4%
swap-sqr40.6%
add-sqr-sqrt40.6%
pow240.6%
fmm-def40.6%
Applied egg-rr40.6%
fmm-undef40.6%
*-commutative40.6%
Simplified40.6%
Taylor expanded in x around 0 30.6%
+-commutative30.6%
unpow230.6%
associate-*r*30.6%
distribute-rgt-in40.6%
mul-1-neg40.6%
unsub-neg40.6%
Simplified40.6%
if 4.40000000000000004e64 < t < 1.8500000000000001e174Initial program 100.0%
Taylor expanded in t around 0 8.8%
Taylor expanded in y around inf 29.1%
if 1.8500000000000001e174 < t Initial program 100.0%
Taylor expanded in t around 0 12.3%
Taylor expanded in x around inf 24.6%
mul-1-neg24.6%
unsub-neg24.6%
Simplified24.6%
Final simplification60.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))))
(if (or (<= (* x 0.5) -4e+68) (not (<= (* x 0.5) 5e+14)))
(* (* x 0.5) t_1)
(* y (- t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if (((x * 0.5) <= -4e+68) || !((x * 0.5) <= 5e+14)) {
tmp = (x * 0.5) * t_1;
} else {
tmp = y * -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 = sqrt((z * 2.0d0))
if (((x * 0.5d0) <= (-4d+68)) .or. (.not. ((x * 0.5d0) <= 5d+14))) then
tmp = (x * 0.5d0) * t_1
else
tmp = y * -t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((z * 2.0));
double tmp;
if (((x * 0.5) <= -4e+68) || !((x * 0.5) <= 5e+14)) {
tmp = (x * 0.5) * t_1;
} else {
tmp = y * -t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if ((x * 0.5) <= -4e+68) or not ((x * 0.5) <= 5e+14): tmp = (x * 0.5) * t_1 else: tmp = y * -t_1 return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if ((Float64(x * 0.5) <= -4e+68) || !(Float64(x * 0.5) <= 5e+14)) tmp = Float64(Float64(x * 0.5) * t_1); else tmp = Float64(y * Float64(-t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if (((x * 0.5) <= -4e+68) || ~(((x * 0.5) <= 5e+14))) tmp = (x * 0.5) * t_1; else tmp = y * -t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[Or[LessEqual[N[(x * 0.5), $MachinePrecision], -4e+68], N[Not[LessEqual[N[(x * 0.5), $MachinePrecision], 5e+14]], $MachinePrecision]], N[(N[(x * 0.5), $MachinePrecision] * t$95$1), $MachinePrecision], N[(y * (-t$95$1)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;x \cdot 0.5 \leq -4 \cdot 10^{+68} \lor \neg \left(x \cdot 0.5 \leq 5 \cdot 10^{+14}\right):\\
\;\;\;\;\left(x \cdot 0.5\right) \cdot t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-t\_1\right)\\
\end{array}
\end{array}
if (*.f64 x #s(literal 1/2 binary64)) < -3.99999999999999981e68 or 5e14 < (*.f64 x #s(literal 1/2 binary64)) Initial program 99.9%
Taylor expanded in t around 0 61.4%
Taylor expanded in x around inf 56.6%
if -3.99999999999999981e68 < (*.f64 x #s(literal 1/2 binary64)) < 5e14Initial program 98.6%
Taylor expanded in t around 0 52.5%
Taylor expanded in x around 0 43.8%
mul-1-neg82.2%
Simplified43.8%
*-rgt-identity43.8%
distribute-lft-neg-out43.8%
neg-sub043.8%
Applied egg-rr43.8%
neg-sub043.8%
*-commutative43.8%
distribute-rgt-neg-in43.8%
*-commutative43.8%
Simplified43.8%
Final simplification49.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (sqrt (* z 2.0))))
(if (<= t 1.35e+15)
(* (- (* x 0.5) y) t_1)
(if (<= t 2.9e+41)
(sqrt (* (* z 2.0) (* y (- y x))))
(* t_1 (* x (- 0.5 (/ y x))))))))
double code(double x, double y, double z, double t) {
double t_1 = sqrt((z * 2.0));
double tmp;
if (t <= 1.35e+15) {
tmp = ((x * 0.5) - y) * t_1;
} else if (t <= 2.9e+41) {
tmp = sqrt(((z * 2.0) * (y * (y - x))));
} else {
tmp = t_1 * (x * (0.5 - (y / 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) :: t_1
real(8) :: tmp
t_1 = sqrt((z * 2.0d0))
if (t <= 1.35d+15) then
tmp = ((x * 0.5d0) - y) * t_1
else if (t <= 2.9d+41) then
tmp = sqrt(((z * 2.0d0) * (y * (y - x))))
else
tmp = t_1 * (x * (0.5d0 - (y / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = Math.sqrt((z * 2.0));
double tmp;
if (t <= 1.35e+15) {
tmp = ((x * 0.5) - y) * t_1;
} else if (t <= 2.9e+41) {
tmp = Math.sqrt(((z * 2.0) * (y * (y - x))));
} else {
tmp = t_1 * (x * (0.5 - (y / x)));
}
return tmp;
}
def code(x, y, z, t): t_1 = math.sqrt((z * 2.0)) tmp = 0 if t <= 1.35e+15: tmp = ((x * 0.5) - y) * t_1 elif t <= 2.9e+41: tmp = math.sqrt(((z * 2.0) * (y * (y - x)))) else: tmp = t_1 * (x * (0.5 - (y / x))) return tmp
function code(x, y, z, t) t_1 = sqrt(Float64(z * 2.0)) tmp = 0.0 if (t <= 1.35e+15) tmp = Float64(Float64(Float64(x * 0.5) - y) * t_1); elseif (t <= 2.9e+41) tmp = sqrt(Float64(Float64(z * 2.0) * Float64(y * Float64(y - x)))); else tmp = Float64(t_1 * Float64(x * Float64(0.5 - Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = sqrt((z * 2.0)); tmp = 0.0; if (t <= 1.35e+15) tmp = ((x * 0.5) - y) * t_1; elseif (t <= 2.9e+41) tmp = sqrt(((z * 2.0) * (y * (y - x)))); else tmp = t_1 * (x * (0.5 - (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 1.35e+15], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[t, 2.9e+41], N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(y * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t$95$1 * N[(x * N[(0.5 - N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{z \cdot 2}\\
\mathbf{if}\;t \leq 1.35 \cdot 10^{+15}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot t\_1\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{+41}:\\
\;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \left(y \cdot \left(y - x\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot \left(x \cdot \left(0.5 - \frac{y}{x}\right)\right)\\
\end{array}
\end{array}
if t < 1.35e15Initial program 98.9%
associate-*l*99.8%
remove-double-neg99.8%
remove-double-neg99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 69.4%
if 1.35e15 < t < 2.89999999999999988e41Initial program 100.0%
Taylor expanded in t around 0 3.8%
add-sqr-sqrt3.2%
sqrt-unprod26.6%
*-commutative26.6%
*-commutative26.6%
swap-sqr50.6%
add-sqr-sqrt50.6%
pow250.6%
fmm-def50.6%
Applied egg-rr50.6%
fmm-undef50.6%
*-commutative50.6%
Simplified50.6%
Taylor expanded in x around 0 38.1%
+-commutative38.1%
unpow238.1%
associate-*r*38.1%
distribute-rgt-in50.6%
mul-1-neg50.6%
unsub-neg50.6%
Simplified50.6%
if 2.89999999999999988e41 < t Initial program 100.0%
Taylor expanded in t around 0 10.3%
Taylor expanded in x around inf 20.1%
mul-1-neg20.1%
unsub-neg20.1%
Simplified20.1%
Final simplification59.5%
(FPCore (x y z t) :precision binary64 (if (<= t 1.26e+15) (* (- (* x 0.5) y) (sqrt (* z 2.0))) (sqrt (* (* z 2.0) (* y (- y x))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.26e+15) {
tmp = ((x * 0.5) - y) * sqrt((z * 2.0));
} else {
tmp = sqrt(((z * 2.0) * (y * (y - 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 (t <= 1.26d+15) then
tmp = ((x * 0.5d0) - y) * sqrt((z * 2.0d0))
else
tmp = sqrt(((z * 2.0d0) * (y * (y - x))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= 1.26e+15) {
tmp = ((x * 0.5) - y) * Math.sqrt((z * 2.0));
} else {
tmp = Math.sqrt(((z * 2.0) * (y * (y - x))));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= 1.26e+15: tmp = ((x * 0.5) - y) * math.sqrt((z * 2.0)) else: tmp = math.sqrt(((z * 2.0) * (y * (y - x)))) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= 1.26e+15) tmp = Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))); else tmp = sqrt(Float64(Float64(z * 2.0) * Float64(y * Float64(y - x)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= 1.26e+15) tmp = ((x * 0.5) - y) * sqrt((z * 2.0)); else tmp = sqrt(((z * 2.0) * (y * (y - x)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, 1.26e+15], N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(z * 2.0), $MachinePrecision] * N[(y * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.26 \cdot 10^{+15}:\\
\;\;\;\;\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\left(z \cdot 2\right) \cdot \left(y \cdot \left(y - x\right)\right)}\\
\end{array}
\end{array}
if t < 1.26e15Initial program 98.9%
associate-*l*99.8%
remove-double-neg99.8%
remove-double-neg99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 69.4%
if 1.26e15 < t Initial program 100.0%
Taylor expanded in t around 0 9.4%
add-sqr-sqrt5.8%
sqrt-unprod22.7%
*-commutative22.7%
*-commutative22.7%
swap-sqr31.3%
add-sqr-sqrt31.3%
pow231.3%
fmm-def31.3%
Applied egg-rr31.3%
fmm-undef31.3%
*-commutative31.3%
Simplified31.3%
Taylor expanded in x around 0 18.8%
+-commutative18.8%
unpow218.8%
associate-*r*18.8%
distribute-rgt-in22.4%
mul-1-neg22.4%
unsub-neg22.4%
Simplified22.4%
Final simplification59.1%
(FPCore (x y z t) :precision binary64 (* (- (* x 0.5) y) (sqrt (* z 2.0))))
double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * sqrt((z * 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 = ((x * 0.5d0) - y) * sqrt((z * 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return ((x * 0.5) - y) * Math.sqrt((z * 2.0));
}
def code(x, y, z, t): return ((x * 0.5) - y) * math.sqrt((z * 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) end
function tmp = code(x, y, z, t) tmp = ((x * 0.5) - y) * sqrt((z * 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}
\end{array}
Initial program 99.1%
associate-*l*99.8%
remove-double-neg99.8%
remove-double-neg99.8%
exp-sqrt99.8%
exp-prod99.8%
Simplified99.8%
pow199.8%
sqrt-unprod99.8%
associate-*l*99.8%
pow-exp99.8%
pow299.8%
Applied egg-rr99.8%
unpow199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 56.2%
Final simplification56.2%
(FPCore (x y z t) :precision binary64 (* y (- (sqrt (* z 2.0)))))
double code(double x, double y, double z, double t) {
return y * -sqrt((z * 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 = y * -sqrt((z * 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return y * -Math.sqrt((z * 2.0));
}
def code(x, y, z, t): return y * -math.sqrt((z * 2.0))
function code(x, y, z, t) return Float64(y * Float64(-sqrt(Float64(z * 2.0)))) end
function tmp = code(x, y, z, t) tmp = y * -sqrt((z * 2.0)); end
code[x_, y_, z_, t_] := N[(y * (-N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \left(-\sqrt{z \cdot 2}\right)
\end{array}
Initial program 99.1%
Taylor expanded in t around 0 56.2%
Taylor expanded in x around 0 28.4%
mul-1-neg62.9%
Simplified28.4%
*-rgt-identity28.4%
distribute-lft-neg-out28.4%
neg-sub028.4%
Applied egg-rr28.4%
neg-sub028.4%
*-commutative28.4%
distribute-rgt-neg-in28.4%
*-commutative28.4%
Simplified28.4%
Final simplification28.4%
(FPCore (x y z t) :precision binary64 (* y (sqrt (* z 2.0))))
double code(double x, double y, double z, double t) {
return y * sqrt((z * 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 = y * sqrt((z * 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return y * Math.sqrt((z * 2.0));
}
def code(x, y, z, t): return y * math.sqrt((z * 2.0))
function code(x, y, z, t) return Float64(y * sqrt(Float64(z * 2.0))) end
function tmp = code(x, y, z, t) tmp = y * sqrt((z * 2.0)); end
code[x_, y_, z_, t_] := N[(y * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \sqrt{z \cdot 2}
\end{array}
Initial program 99.1%
Taylor expanded in t around 0 56.2%
Taylor expanded in x around 0 28.4%
mul-1-neg28.4%
Simplified28.4%
add-sqr-sqrt13.4%
sqrt-unprod15.3%
sqr-neg15.3%
sqrt-unprod1.7%
add-sqr-sqrt2.8%
*-commutative2.8%
*-commutative2.8%
associate-*r*2.8%
sqrt-prod2.8%
Applied egg-rr2.8%
Final simplification2.8%
(FPCore (x y z t) :precision binary64 (* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (pow (exp 1.0) (/ (* t t) 2.0))))
double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * sqrt((z * 2.0))) * pow(exp(1.0), ((t * t) / 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 = (((x * 0.5d0) - y) * sqrt((z * 2.0d0))) * (exp(1.0d0) ** ((t * t) / 2.0d0))
end function
public static double code(double x, double y, double z, double t) {
return (((x * 0.5) - y) * Math.sqrt((z * 2.0))) * Math.pow(Math.exp(1.0), ((t * t) / 2.0));
}
def code(x, y, z, t): return (((x * 0.5) - y) * math.sqrt((z * 2.0))) * math.pow(math.exp(1.0), ((t * t) / 2.0))
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * 0.5) - y) * sqrt(Float64(z * 2.0))) * (exp(1.0) ^ Float64(Float64(t * t) / 2.0))) end
function tmp = code(x, y, z, t) tmp = (((x * 0.5) - y) * sqrt((z * 2.0))) * (exp(1.0) ^ ((t * t) / 2.0)); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * 0.5), $MachinePrecision] - y), $MachinePrecision] * N[Sqrt[N[(z * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[N[Exp[1.0], $MachinePrecision], N[(N[(t * t), $MachinePrecision] / 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot 0.5 - y\right) \cdot \sqrt{z \cdot 2}\right) \cdot {\left(e^{1}\right)}^{\left(\frac{t \cdot t}{2}\right)}
\end{array}
herbie shell --seed 2024186
(FPCore (x y z t)
:name "Data.Number.Erf:$cinvnormcdf from erf-2.0.0.0, A"
:precision binary64
:alt
(! :herbie-platform default (* (* (- (* x 1/2) y) (sqrt (* z 2))) (pow (exp 1) (/ (* t t) 2))))
(* (* (- (* x 0.5) y) (sqrt (* z 2.0))) (exp (/ (* t t) 2.0))))