mbostock/d3 — comment on commit 7895afbda5d60eefa56c1851561b6a5c90175a21
File: d3.js line 2278
By mbostock:

Ah, okay. I was confused because you said "extent[1] is 0". Thanks for posting the actual values.

I've totally forgotten why we're calling Math.round there. I don't think it should be necessary? This appears to work:

```diff
diff --git a/src/scale/log.js b/src/scale/log.js
index 6f1869f..b8425d0 100644
--- a/src/scale/log.js
+++ b/src/scale/log.js
@@ -32,8 +32,8 @@ function d3_scale_log(linear, log) {
if (extent.every(isFinite)) {
var i = Math.floor(extent[0]),
j = Math.ceil(extent[1]),
- u = Math.round(pow(extent[0])),
- v = Math.round(pow(extent[1]));
+ u = pow(extent[0]),
+ v = pow(extent[1]);
if (log === d3_scale_logn) {
ticks.push(pow(i));
for (; i++ < j;) for (var k = 9; k > 0; k--) ticks.push(pow(i) * k);
```

There's one test that fails, but it's because of a floating point error (999.9999999… *vs.* 1000). That test can be easily made more precise by increasing the domain to 1,000.1.