Missing math module?

Questions and discussion about The WiPy 1.0 board and CC3200 boards.
Target audience: Users with a WiPy 1.0 or CC3200 board.
Post Reply
User avatar
marcelstoer
Posts: 10
Joined: Sun Nov 08, 2015 9:42 pm
Contact:

Missing math module?

Post by marcelstoer » Sat May 28, 2016 4:29 pm

According to https://micropython.org/resources/docs/ ... /math.html there's a math module (I know, no floating point though). Yet, when I run

Code: Select all

import math


the answer is

Code: Select all

File "<stdin>", line 1, in <module>
ImportError: module not found
Since Google didn't turn up anything helpful when I searched for this I feel I'm doing something wrong. What is it?

I'm running release 1.2.

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Missing math module?

Post by pythoncoder » Sat May 28, 2016 4:47 pm

Is there any conceivable use for the math module on a device which lacks FP? I'm genuinely puzzled here ;)
Peter Hinch
Index to my micropython libraries.

User avatar
marcelstoer
Posts: 10
Joined: Sun Nov 08, 2015 9:42 pm
Contact:

Re: Missing math module?

Post by marcelstoer » Sat May 28, 2016 6:36 pm

That's what I asked myself when I looked at the available functions. If you're implicitly saying that there's really no math module on the WiPy, which would make sense to me, then why is it in the docs?

User avatar
marcelstoer
Posts: 10
Joined: Sun Nov 08, 2015 9:42 pm
Contact:

Re: Missing math module?

Post by marcelstoer » Sun May 29, 2016 8:17 am

The docs are misleading and inconsistent indeed. At https://micropython.org/resources/docs/ ... neral.html it clearly says
Due to space reasons, there’s no floating point support, and no math module.
I'll create an issue at https://github.com/micropython/micropython/issues as I haven't found out yet which .rst file causes this.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Missing math module?

Post by Roberthh » Sun May 29, 2016 7:40 pm

Due to space reasons, there’s no floating point support, and no math module.
This sentence is in docs/wipy/general.rst

User avatar
marcelstoer
Posts: 10
Joined: Sun Nov 08, 2015 9:42 pm
Contact:

Re: Missing math module?

Post by marcelstoer » Sun May 29, 2016 7:44 pm

Roberthh wrote:
Due to space reasons, there’s no floating point support, and no math module.
This sentence is in docs/wipy/general.rst
I know but I haven't found out what makes the /wipy/library/math.html path appear. You've got to search for 'math' in the docs for that URL to become available. It's not in the left-hand navigation tree.

Post Reply