MCPcopy Create free account
hub / github.com/sql-js/sql.js / _cothFunc

Function _cothFunc

js/sql-debug.js:6976–7015  ·  view source on GitHub ↗
($0,$1,$2)

Source from the content-addressed store, hash-verified

6974 }
6975}
6976function _cothFunc($0,$1,$2) {
6977 $0 = $0|0;
6978 $1 = $1|0;
6979 $2 = $2|0;
6980 var $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0, $cond = 0, label = 0, sp = 0;
6981 sp = STACKTOP;
6982 $3 = ($1|0)==(1);
6983 if (!($3)) {
6984 ___assert_fail((16149|0),(16157|0),456,(16742|0));
6985 // unreachable;
6986 }
6987 $4 = HEAP32[$2>>2]|0;
6988 $5 = (_sqlite3_value_type($4)|0);
6989 $cond = ($5|0)==(5);
6990 if ($cond) {
6991 _sqlite3_result_null($0);
6992 return;
6993 }
6994 $6 = HEAP32[$2>>2]|0;
6995 $7 = (+_sqlite3_value_double($6));
6996 $8 = (___errno_location()|0);
6997 HEAP32[$8>>2] = 0;
6998 $9 = (___errno_location()|0);
6999 $10 = HEAP32[$9>>2]|0;
7000 $11 = ($10|0)==(0);
7001 if ($11) {
7002 $12 = (+_tanh($7));
7003 $13 = 1.0 / $12;
7004 _sqlite3_result_double($0,$13);
7005 return;
7006 } else {
7007 $14 = (___errno_location()|0);
7008 $15 = HEAP32[$14>>2]|0;
7009 $16 = (_strerror($15)|0);
7010 $17 = (___errno_location()|0);
7011 $18 = HEAP32[$17>>2]|0;
7012 _sqlite3_result_error($0,$16,$18);
7013 return;
7014 }
7015}
7016function _expFunc($0,$1,$2) {
7017 $0 = $0|0;
7018 $1 = $1|0;

Callers

nothing calls this directly

Calls 9

_sqlite3_value_typeFunction · 0.85
_sqlite3_result_nullFunction · 0.85
_sqlite3_value_doubleFunction · 0.85
___errno_locationFunction · 0.85
_tanhFunction · 0.85
_sqlite3_result_doubleFunction · 0.85
_strerrorFunction · 0.85
_sqlite3_result_errorFunction · 0.85
___assert_failFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…