mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
math_tests: pow test (#1842)
* math::nolibc: replaced code with word macros * math_tests: pow test Added test for pow and added more test points for the exp and log tests.
This commit is contained in:
@@ -18,7 +18,7 @@ module std::math::nolibc @if(env::NO_LIBC || $feature(C3_MATH));
|
||||
|
||||
fn float _sinf(float x) @weak @extern("sinf") @nostrip
|
||||
{
|
||||
uint ix = bitcast(x, uint);
|
||||
uint ix = x.word();
|
||||
int sign = ix >> 31;
|
||||
ix &= 0x7fffffff;
|
||||
switch
|
||||
@@ -87,8 +87,7 @@ fn float _sinf(float x) @weak @extern("sinf") @nostrip
|
||||
fn double sin(double x) @extern("sin") @weak @nostrip
|
||||
{
|
||||
// High word of x.
|
||||
uint ix = (uint)(bitcast(x, ulong) >> 32);
|
||||
ix &= 0x7fffffff;
|
||||
uint ix = x.high_word() & 0x7fffffff;
|
||||
switch
|
||||
{
|
||||
// |x| ~< pi/4
|
||||
|
||||
Reference in New Issue
Block a user