Skip to content

Some math functions #353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 20, 2014
Merged

Some math functions #353

merged 2 commits into from
Mar 20, 2014

Conversation

rjdowdall
Copy link
Contributor

I have added some trivial calls to C functions in the math builtin module and a test math.py. The test does not work well yet since formatting of floats does not seem to be implemented yet.

dpgeorge added a commit that referenced this pull request Mar 20, 2014
@dpgeorge dpgeorge merged commit 7caa7e0 into micropython:master Mar 20, 2014
@dhylands
Copy link
Contributor

If nobody else is looking at this, I'll take look at hooking up format to the format_float routine over the weekend.

@blmorris
Copy link
Contributor

I am having trouble compiling the stm ports, build is failing at builtinmath.c
I have tried building both stm and the new stmhal tree, both fail with the same set of error messages:

CC ../py/builtinmp.c
CC ../py/builtinmath.c
../py/builtinmath.c: In function 'mp_math_isfinite':
../py/builtinmath.c:49:1: error: implicit declaration of function 'isfinitef' [-Werror=implicit-function-declaration]
../py/builtinmath.c:49:1: error: implicit conversion from 'mp_float_t' to 'double' when passing argument to function [-Werror=double-promotion]
../py/builtinmath.c: In function 'mp_math_isinf':
../py/builtinmath.c:50:1: error: implicit declaration of function 'isinff' [-Werror=implicit-function-declaration]
../py/builtinmath.c:50:1: error: incompatible implicit declaration of built-in function 'isinff' [-Werror]
../py/builtinmath.c: In function 'mp_math_isnan':
../py/builtinmath.c:51:1: error: implicit declaration of function 'isnanf' [-Werror=implicit-function-declaration]
../py/builtinmath.c:51:1: error: incompatible implicit declaration of built-in function 'isnanf' [-Werror]
cc1: all warnings being treated as errors
make: *** [build/py/builtinmath.o] Error 1

Unix version is building correctly at this point.

Very glad to see work coming along on the math functions; wish I knew how to help fix them.

@dpgeorge
Copy link
Member

Yes, I see the problem. I've disabled these functions until they are implemented correctly.

tannewt added a commit to tannewt/circuitpython that referenced this pull request Oct 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants