expr1
${\frac{1}{2}}{\left({{\exp\left( x\right)}{-{\frac{1}{\exp\left( x\right)}}}}\right)}$
expr2
${\frac{1}{2}}{\left({{\exp\left( x\right)} + {\frac{1}{\exp\left( x\right)}}}\right)}$
==== lang: C ====
-----------------------
x
code:
double out1 = x;
func code:
[](double* out) {
double out1 = x;
out[0] = out1;
}
-----------------------
expr1
code:
double tmp1 = exp(x);
double out1 = (-1. / tmp1 + tmp1) / 2.;
func code:
[](double* out, double x) {
double tmp1 = exp(x);
double out1 = (-1. / tmp1 + tmp1) / 2.;
out[0] = out1;
}
-----------------------
expr2
code:
double tmp1 = exp(x);
double out1 = (1. / tmp1 + tmp1) / 2.;
func code:
[](double* out, double x) {
double tmp1 = exp(x);
double out1 = (1. / tmp1 + tmp1) / 2.;
out[0] = out1;
}
-----------------------
expr1 & expr2
code:
double tmp1 = exp(x);
double tmp2 = 1. / tmp1;
double out1 = (-tmp2 + tmp1) / 2.;
double out2 = (tmp1 + tmp2) / 2.;
func code:
[](double* out, double x) {
double tmp1 = exp(x);
double tmp2 = 1. / tmp1;
double out1 = (-tmp2 + tmp1) / 2.;
double out2 = (tmp1 + tmp2) / 2.;
out[0] = out1;
out[1] = out2;
}
==== lang: JavaScript ====
-----------------------
x
code:
const out1 = x;
func code:
function() {
const out1 = x;
return out1;
}
-----------------------
expr1
code:
const tmp1 = Math.exp(x);
const out1 = (-1 / tmp1 + tmp1) / 2;
func code:
function(x) {
const tmp1 = Math.exp(x);
const out1 = (-1 / tmp1 + tmp1) / 2;
return out1;
}
-----------------------
expr2
code:
const tmp1 = Math.exp(x);
const out1 = (1 / tmp1 + tmp1) / 2;
func code:
function(x) {
const tmp1 = Math.exp(x);
const out1 = (1 / tmp1 + tmp1) / 2;
return out1;
}
-----------------------
expr1 & expr2
code:
const tmp1 = Math.exp(x);
const tmp2 = 1 / tmp1;
const out1 = (-tmp2 + tmp1) / 2;
const out2 = (tmp1 + tmp2) / 2;
func code:
function(x) {
const tmp1 = Math.exp(x);
const tmp2 = 1 / tmp1;
const out1 = (-tmp2 + tmp1) / 2;
const out2 = (tmp1 + tmp2) / 2;
return [out1, out2];
}
==== lang: Lua ====
-----------------------
x
code:
local out1 = x
func code:
function()
local out1 = x
return out1
end
-----------------------
expr1
code:
local tmp1 = math.exp(x)
local out1 = (-1 / tmp1 + tmp1) / 2
func code:
function(x)
local tmp1 = math.exp(x)
local out1 = (-1 / tmp1 + tmp1) / 2
return out1
end
-----------------------
expr2
code:
local tmp1 = math.exp(x)
local out1 = (1 / tmp1 + tmp1) / 2
func code:
function(x)
local tmp1 = math.exp(x)
local out1 = (1 / tmp1 + tmp1) / 2
return out1
end
-----------------------
expr1 & expr2
code:
local tmp1 = math.exp(x)
local tmp2 = 1 / tmp1
local out1 = (-tmp2 + tmp1) / 2
local out2 = (tmp1 + tmp2) / 2
func code:
function(x)
local tmp1 = math.exp(x)
local tmp2 = 1 / tmp1
local out1 = (-tmp2 + tmp1) / 2
local out2 = (tmp1 + tmp2) / 2
return out1, out2
end
==== lang: Mathematica ====
-----------------------
x
code:
out1 = x;
func code:
[] :=
out1 = x;
out1;
-----------------------
expr1
code:
tmp1 = exp[x];
out1 = (-1 / tmp1 + tmp1) / 2;
func code:
[x_] :=
tmp1 = exp[x];
out1 = (-1 / tmp1 + tmp1) / 2;
out1;
-----------------------
expr2
code:
tmp1 = exp[x];
out1 = (1 / tmp1 + tmp1) / 2;
func code:
[x_] :=
tmp1 = exp[x];
out1 = (1 / tmp1 + tmp1) / 2;
out1;
-----------------------
expr1 & expr2
code:
tmp1 = exp[x];
tmp2 = 1 / tmp1;
out1 = (-tmp2 + tmp1) / 2;
out2 = (tmp1 + tmp2) / 2;
func code:
[x_] :=
tmp1 = exp[x];
tmp2 = 1 / tmp1;
out1 = (-tmp2 + tmp1) / 2;
out2 = (tmp1 + tmp2) / 2;
[out1, out2];
==== lang: GnuPlot ====
-----------------------
x
code:
out1 = x
func code:
() =
out1 = x
return out1
-----------------------
expr1
code:
tmp1 = (exp(x))
out1 = (-1. / tmp1 + tmp1) / 2.
func code:
(x) =
tmp1 = (exp(x))
out1 = (-1. / tmp1 + tmp1) / 2.
return out1
-----------------------
expr2
code:
tmp1 = (exp(x))
out1 = (1. / tmp1 + tmp1) / 2.
func code:
(x) =
tmp1 = (exp(x))
out1 = (1. / tmp1 + tmp1) / 2.
return out1
-----------------------
expr1 & expr2
code:
tmp1 = (exp(x))
tmp2 = 1. / tmp1
out1 = (-tmp2 + tmp1) / 2.
out2 = (tmp1 + tmp2) / 2.
func code:
(x) =
tmp1 = (exp(x))
tmp2 = 1. / tmp1
out1 = (-tmp2 + tmp1) / 2.
out2 = (tmp1 + tmp2) / 2.
return out1, out2
double tmp1 = sinh(w);
double tmp2 = rho / tmp1;
double tmp3 = sinh(tmp2);
double tmp4 = 1. / tmp1;
double tmp5 = A * tmp3;
double tmp6 = sinh(tmp4);
double tmp7 = sin(theta);
double tmp8 = tmp5 / tmp6;
double x = cos(phi) * tmp7 * tmp8;
double y = sin(phi) * tmp7 * tmp8;
double z = cos(theta) * tmp8;