v0.3.0: restructure directories
- src/ ← compiler/selfhost/ (canonical Bux compiler) - bootstrap/ ← compiler/bootstrap/ (Nim bootstrap) - lib/ ← library/std/ (standard library) - rt/ ← library/runtime/ (C runtime) - tests/ ← compiler/tests/ (unit tests) - Remove _selfhost/ (built into build/selfhost/ now) - Update all path references (Makefile, cli.nim, cli.bux, docs) - Bump version to 0.3.0
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
module Std::Math {
|
||||
|
||||
extern func bux_sqrt(x: float64) -> float64;
|
||||
extern func bux_pow(x: float64, y: float64) -> float64;
|
||||
extern func bux_abs_i64(x: int64) -> int64;
|
||||
extern func bux_abs_f64(x: float64) -> float64;
|
||||
extern func bux_min_i64(a: int64, b: int64) -> int64;
|
||||
extern func bux_max_i64(a: int64, b: int64) -> int64;
|
||||
extern func bux_min_f64(a: float64, b: float64) -> float64;
|
||||
extern func bux_max_f64(a: float64, b: float64) -> float64;
|
||||
|
||||
func Sqrt(x: float64) -> float64 {
|
||||
return bux_sqrt(x);
|
||||
}
|
||||
|
||||
func Pow(x: float64, y: float64) -> float64 {
|
||||
return bux_pow(x, y);
|
||||
}
|
||||
|
||||
func Abs(n: int64) -> int64 {
|
||||
return bux_abs_i64(n);
|
||||
}
|
||||
|
||||
func AbsF(f: float64) -> float64 {
|
||||
return bux_abs_f64(f);
|
||||
}
|
||||
|
||||
func Min(a: int64, b: int64) -> int64 {
|
||||
return bux_min_i64(a, b);
|
||||
}
|
||||
|
||||
func Max(a: int64, b: int64) -> int64 {
|
||||
return bux_max_i64(a, b);
|
||||
}
|
||||
|
||||
func MinF(a: float64, b: float64) -> float64 {
|
||||
return bux_min_f64(a, b);
|
||||
}
|
||||
|
||||
func MaxF(a: float64, b: float64) -> float64 {
|
||||
return bux_max_f64(a, b);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user