Opened 16 years ago
Closed 16 years ago
#35 closed defect (invalid)
incorrect log10 implementation
Reported by: | Dmitry | Owned by: | alex |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | BuildTools | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Hello,
your javascript log10 implementation could lead to rounding errors and is incorrect.
Use this instead(look for idea or cut-n-paste):
function uc_log10_floor(n) {
n = String(n).toLowerCase(); var a1 = n.split('e'), a2 = a1[0].split('.'); return a2[0].length + (a1[1] ? parseInt(a1[1], 10) : 0) - 1 }
Regards, Dmitry, [email protected]…
Change History (5)
comment:1 Changed 16 years ago by
Priority: | normal → low |
---|
comment:2 Changed 16 years ago by
I can't find it now, but it is there for sure - I've found the page with implementation via google
comment:3 Changed 16 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:4 Changed 16 years ago by
Component: | General → BuildTools |
---|---|
Resolution: | invalid |
Status: | closed → reopened |
Could you please edit the original ticket and remove "[email protected]…" from it?
Thanks, Dmitry
comment:5 Changed 16 years ago by
Resolution: | → invalid |
---|---|
Status: | reopened → closed |
We don't implement log10
Note: See
TracTickets for help on using
tickets.
I've grep'd the source tree and I'm not sure that I see a log10 implementation that is peculiar to Dojo. Are you reporting that JavaScript? as a language is broken?