question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug with quantityExponent

See original GitHub issue

Version

4.3.0

Reproduction link

https://github.com/apache/incubator-echarts/blob/7041103fb91cf5aeacf934bc990a023dfd3c5dfa/src/util/number.js#L390

Steps to reproduce

quantityExponent has bug with quantityExponent(1000)

What is expected?

quantityExponent(1000) is expected to be 3

What is actually happening?

quantityExponent(1000) = 2

I recommend using Math.log10(val) instead.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
Oviliacommented, Sep 18, 2019

@GEMINI-SYSU Thanks for reporting! Do you mind making a pull request to fix it?

0reactions
Oviliacommented, Oct 25, 2019

@GEMINI5516 Hi, I made a PR about this since I got no reply from you. You are welcomed to offer help next time. 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is exponent so low when used with hat-quantity in a ...
If you look really closely, you'll notice that the exponent isn't set quite as high in uncramped textstyle math mode as it is...
Read more >
[Bug] Exponent issue in table display #29035 - GitHub
What happened: In table Panel, when the result is a String with 0370994E-03 for exemple, the interpretation of the result is 371.
Read more >
Math.pow is returning wrong value with negative exponents
toFixed returns a string not a JS number. I repeat: toFixed() is shows the exact decimal value of the underlying binary floating point...
Read more >
Microsoft Excel arithmetic bug (negative of a power)
In Excel, "=-3^2" incorrectly gives 9. You may try entering "-3^2" in Wolfram Alpha, Google, Scilab, or a scientific calculator (even Windows ...
Read more >
Bugs in V8's Exponentiation Operator - Cmichel.io
12.6.4 - Applying the ** Operator states that the result is implementation-dependent - but there should still be no discrepancy between ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found