Issue 30875: round(number[, digits]) does not return value with >12 decimal places (original) (raw)
Issue30875
Created on 2017-07-08 03:07 by john Forgue, last changed 2022-04-11 14:58 by admin. This issue is now closed.
Messages (3) | ||
---|---|---|
msg297928 - (view) | Author: john Forgue (john Forgue) | Date: 2017-07-08 03:07 |
I have a sensor that returns float with 15 decimal places. Using "round(number[, digits])" in a program I get no rounding Using the same command in the terminal interpreter it returns ... (3 periods) then hangs requiring ^C to continue. I'm using Python 3.4.2 on RasPi Jessie. | ||
msg297929 - (view) | Author: Steven D'Aprano (steven.daprano) * ![]() |
Date: 2017-07-08 03:30 |
> Using "round(number[, digits])" in a program I get no rounding It works for me. Can you show an example of it not working? py> round(1.23456789012345, 3) 1.235 > Using the same command in the terminal interpreter it returns > ... (3 periods) then hangs requiring ^C to continue. That sounds like the interactive interpreter is waiting for a closing parenthesis (round bracket). It will sit and wait forever for you to finish typing the command. If you hit ENTER, you'll just get another prompt. py> round(1.23456789012345, 3 ... ... ... ) 1.235 If this does not explain what you are seeing, you will have to give us more information, including examples of the failures and instructions for how to replicate the failure. | ||
msg297959 - (view) | Author: john Forgue (john Forgue) | Date: 2017-07-08 16:26 |
I found a programming issue that circumvented the round function. As for the terminal "verification" I reported.... I'm not sure what I did and cannot repeat. Sorry for the false alarm. John |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:58:48 | admin | set | github: 75058 |
2017-07-08 16:26:57 | john Forgue | set | status: open -> closedresolution: works for memessages: + stage: resolved |
2017-07-08 15:38:25 | mark.dickinson | set | nosy: + mark.dickinson |
2017-07-08 03:30:08 | steven.daprano | set | nosy: + steven.dapranomessages: + |
2017-07-08 03:07:40 | john Forgue | create |