Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/Theodeus/tuna
/ sign
Function
sign
tuna.js:202–208 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
200
}
201
202
function
sign(x) {
203
if
(x === 0) {
204
return
1;
205
}
else
{
206
return
Math.abs(x) / x;
207
}
208
}
209
210
function
tanh(n) {
211
return
(Math.exp(n) - Math.exp(-n)) / (Math.exp(n) + Math.exp(-n));
Callers
1
tuna.js
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected