-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from Sparrow-lang/types_work
Rework numeric types
- Loading branch information
Showing
182 changed files
with
9,547 additions
and
9,900 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
module math | ||
|
||
[native("llvm.sqrt.f32")] fun sqrt(x: Float): Float | ||
[native("llvm.sin.f32")] fun sin(x: Float): Float | ||
[native("llvm.cos.f32")] fun cos(x: Float): Float | ||
[native("llvm.powi.f32")] fun powi(x: Float, y: Int): Float | ||
[native("llvm.pow.f32")] fun pow(x, y: Float): Float | ||
[native("llvm.exp.f32")] fun exp(x: Float): Float | ||
[native("llvm.exp2.f32")] fun exp2(x: Float): Float | ||
[native("llvm.log.f32")] fun log(x: Float): Float | ||
[native("llvm.log10.f32")] fun log10(x: Float): Float | ||
[native("llvm.log2.f32")] fun log2(x: Float): Float | ||
[native("llvm.fabs.f32")] fun fabs(x: Float): Float | ||
[native("llvm.floor.f32")] fun floor(x: Float): Float | ||
[native("llvm.ceil.f32")] fun ceil(x: Float): Float | ||
[native("llvm.truc.f32")] fun truc(x: Float): Float | ||
[native("llvm.rint.f32")] fun rint(x: Float): Float | ||
[native("llvm.rint.f32")] fun nearbyint(x: Float): Float | ||
[native("llvm.sqrt.f32")] fun sqrt(x: Float32): Float32 | ||
[native("llvm.sin.f32")] fun sin(x: Float32): Float32 | ||
[native("llvm.cos.f32")] fun cos(x: Float32): Float32 | ||
[native("llvm.powi.f32")] fun powi(x: Float32, y: Int): Float32 | ||
[native("llvm.pow.f32")] fun pow(x, y: Float32): Float32 | ||
[native("llvm.exp.f32")] fun exp(x: Float32): Float32 | ||
[native("llvm.exp2.f32")] fun exp2(x: Float32): Float32 | ||
[native("llvm.log.f32")] fun log(x: Float32): Float32 | ||
[native("llvm.log10.f32")] fun log10(x: Float32): Float32 | ||
[native("llvm.log2.f32")] fun log2(x: Float32): Float32 | ||
[native("llvm.fabs.f32")] fun fabs(x: Float32): Float32 | ||
[native("llvm.floor.f32")] fun floor(x: Float32): Float32 | ||
[native("llvm.ceil.f32")] fun ceil(x: Float32): Float32 | ||
[native("llvm.truc.f32")] fun truc(x: Float32): Float32 | ||
[native("llvm.rint.f32")] fun rint(x: Float32): Float32 | ||
[native("llvm.rint.f32")] fun nearbyint(x: Float32): Float32 | ||
|
||
[native("llvm.sqrt.f64")] fun sqrt(x: Double): Double | ||
[native("llvm.sin.f64")] fun sin(x: Double): Double | ||
[native("llvm.cos.f64")] fun cos(x: Double): Double | ||
[native("llvm.powi.f64")] fun powi(x: Double, y: Int): Double | ||
[native("llvm.pow.f64")] fun pow(x, y: Double): Double | ||
[native("llvm.exp.f64")] fun exp(x: Double): Double | ||
[native("llvm.exp2.f64")] fun exp2(x: Double): Double | ||
[native("llvm.log.f64")] fun log(x: Double): Double | ||
[native("llvm.log10.f64")] fun log10(x: Double): Double | ||
[native("llvm.log2.f64")] fun log2(x: Double): Double | ||
[native("llvm.fabs.f64")] fun fabs(x: Double): Double | ||
[native("llvm.floor.f64")] fun floor(x: Double): Double | ||
[native("llvm.ceil.f64")] fun ceil(x: Double): Double | ||
[native("llvm.truc.f64")] fun truc(x: Double): Double | ||
[native("llvm.rint.f64")] fun rint(x: Double): Double | ||
[native("llvm.rint.f64")] fun nearbyint(x: Double): Double | ||
[native("llvm.sqrt.f64")] fun sqrt(x: Float64): Float64 | ||
[native("llvm.sin.f64")] fun sin(x: Float64): Float64 | ||
[native("llvm.cos.f64")] fun cos(x: Float64): Float64 | ||
[native("llvm.powi.f64")] fun powi(x: Float64, y: Int): Float64 | ||
[native("llvm.pow.f64")] fun pow(x, y: Float64): Float64 | ||
[native("llvm.exp.f64")] fun exp(x: Float64): Float64 | ||
[native("llvm.exp2.f64")] fun exp2(x: Float64): Float64 | ||
[native("llvm.log.f64")] fun log(x: Float64): Float64 | ||
[native("llvm.log10.f64")] fun log10(x: Float64): Float64 | ||
[native("llvm.log2.f64")] fun log2(x: Float64): Float64 | ||
[native("llvm.fabs.f64")] fun fabs(x: Float64): Float64 | ||
[native("llvm.floor.f64")] fun floor(x: Float64): Float64 | ||
[native("llvm.ceil.f64")] fun ceil(x: Float64): Float64 | ||
[native("llvm.truc.f64")] fun truc(x: Float64): Float64 | ||
[native("llvm.rint.f64")] fun rint(x: Float64): Float64 | ||
[native("llvm.rint.f64")] fun nearbyint(x: Float64): Float64 | ||
|
||
fun abs(x: Integer) = ife(x<0, -x, typeOf(x)(x)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.