From 9b07468e50a5b1c78c49fc42f256a01298b463d8 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 21 Jul 2020 22:58:56 +0800 Subject: [PATCH] add libm functions from legacy runtime --- src/runtime/src/kernel/api.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/runtime/src/kernel/api.rs b/src/runtime/src/kernel/api.rs index 1a63a60..c12b152 100644 --- a/src/runtime/src/kernel/api.rs +++ b/src/runtime/src/kernel/api.rs @@ -139,6 +139,15 @@ pub fn resolve(required: &[u8]) -> Option { api!(__artiq_reraise = eh_artiq::reraise), // libm + api_libm_f64f64!(sqrt), + api_libm_f64f64!(round), + api_libm_f64f64!(floor), + { + extern fn fmod(x: f64, y: f64) -> f64 { + libm::fmod(x, y) + } + api!(fmod = fmod) + }, api_libm_f64f64!(log), api_libm_f64f64!(log10), api_libm_f64f64!(exp),