mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
Support roundevenf/roundeven
This commit is contained in:
13
lib/std/math_builtin.c3
Normal file
13
lib/std/math_builtin.c3
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
module std::math;
|
||||||
|
|
||||||
|
fn float __roundevenf(float f) @extname("roundevenf") @weak
|
||||||
|
{
|
||||||
|
// Slow implementation
|
||||||
|
return round(f / 2) * 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
fn double __roundeven(double d) @extname("roundeven") @weak
|
||||||
|
{
|
||||||
|
// Slow implementation
|
||||||
|
return round(d / 2) * 2;
|
||||||
|
}
|
||||||
@@ -1 +1 @@
|
|||||||
#define COMPILER_VERSION "0.4.12"
|
#define COMPILER_VERSION "0.4.13"
|
||||||
Reference in New Issue
Block a user