MCPcopy
hub / github.com/sql-js/sql.js / _cotFunc

Function _cotFunc

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

Source from the content-addressed store, hash-verified

6817 }
6818}
6819function _cotFunc($0,$1,$2) {
6820 $0 = $0|0;
6821 $1 = $1|0;
6822 $2 = $2|0;
6823 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;
6824 sp = STACKTOP;
6825 $3 = ($1|0)==(1);
6826 if (!($3)) {
6827 ___assert_fail((16149|0),(16157|0),422,(16707|0));
6828 // unreachable;
6829 }
6830 $4 = HEAP32[$2>>2]|0;
6831 $5 = (_sqlite3_value_type($4)|0);
6832 $cond = ($5|0)==(5);
6833 if ($cond) {
6834 _sqlite3_result_null($0);
6835 return;
6836 }
6837 $6 = HEAP32[$2>>2]|0;
6838 $7 = (+_sqlite3_value_double($6));
6839 $8 = (___errno_location()|0);
6840 HEAP32[$8>>2] = 0;
6841 $9 = (___errno_location()|0);
6842 $10 = HEAP32[$9>>2]|0;
6843 $11 = ($10|0)==(0);
6844 if ($11) {
6845 $12 = (+Math_tan((+$7)));
6846 $13 = 1.0 / $12;
6847 _sqlite3_result_double($0,$13);
6848 return;
6849 } else {
6850 $14 = (___errno_location()|0);
6851 $15 = HEAP32[$14>>2]|0;
6852 $16 = (_strerror($15)|0);
6853 $17 = (___errno_location()|0);
6854 $18 = HEAP32[$17>>2]|0;
6855 _sqlite3_result_error($0,$16,$18);
6856 return;
6857 }
6858}
6859function _coshFunc($0,$1,$2) {
6860 $0 = $0|0;
6861 $1 = $1|0;

Callers

nothing calls this directly

Calls 8

_sqlite3_value_typeFunction · 0.85
_sqlite3_result_nullFunction · 0.85
_sqlite3_value_doubleFunction · 0.85
___errno_locationFunction · 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…