mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
Unix: add machine-specific sqrt support.
This commit is contained in:
@@ -176,3 +176,9 @@ int main(int argc, char **argv) {
|
||||
//printf("total bytes = %d\n", m_get_total_bytes_allocated());
|
||||
return 0;
|
||||
}
|
||||
|
||||
// for sqrt
|
||||
#include <math.h>
|
||||
machine_float_t machine_sqrt(machine_float_t x) {
|
||||
return sqrt(x);
|
||||
}
|
||||
|
||||
@@ -14,3 +14,5 @@ typedef int64_t machine_int_t; // must be pointer size
|
||||
typedef uint64_t machine_uint_t; // must be pointer size
|
||||
typedef void *machine_ptr_t; // must be of pointer size
|
||||
typedef double machine_float_t;
|
||||
|
||||
machine_float_t machine_sqrt(machine_float_t x);
|
||||
|
||||
Reference in New Issue
Block a user