Improve package math/rand

This commit is contained in:
gingerBill
2019-03-24 20:36:39 +00:00
parent 2ada90e094
commit 2347dca9d9
3 changed files with 226 additions and 9 deletions
+6
View File
@@ -61,9 +61,15 @@ foreign _ {
log_f32 :: proc(x: f32) -> f32 ---;
@(link_name="llvm.log.f64")
log_f64 :: proc(x: f64) -> f64 ---;
@(link_name="llvm.exp.f32")
exp_f32 :: proc(x: f32) -> f32 ---;
@(link_name="llvm.exp.f64")
exp_f64 :: proc(x: f64) -> f64 ---;
}
log :: proc{log_f32, log_f64};
exp :: proc{exp_f32, exp_f64};
tan_f32 :: proc "c" (θ: f32) -> f32 { return sin(θ)/cos(θ); }
tan_f64 :: proc "c" (θ: f64) -> f64 { return sin(θ)/cos(θ); }