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);
    }

}
