Comments (3)
That is indeed the right answer. Here is matlab:
>> format long
>> 10.3*3
ans =
30.900000000000002
This should have been filed at https://github.com/JuliaLang/julia/issues.
from gadfly.jl.
Allright then, thanks for being so polite and giving me a quick short answer.
from gadfly.jl.
This is a weird place to file such a bug since it has nothing to do with Gadfly. A little more elaboration – R looks like its answer is exactly 30.9
because it rounds trailing digits when it prints numbers, effectively lying about their exact value. Checking equality with 30.9
, however, reveals that the value is not actually the same:
> 10.3*3
[1] 30.9
> 10.3*3 == 30.9
[1] FALSE
>
Julia, on the other hand, prints all the digits required to reconstruct a floating point number exactly, so you can see that this value is not exactly 30.9
. All these systems are converting the input 30.9
to the closest representable IEEE 754 64-bit floating-point number (30.9 is not exactly representable in binary), and then doing standard IEEE arithmetic to get this result.
from gadfly.jl.
Related Issues (20)
- Removing outliers from boxplots? HOT 1
- Gadfly not working for simple point plot HOT 2
- tests and building docs currently failing HOT 3
- typos HOT 3
- Question re wrapping Gadfly.jl functionality in Tidier.jl HOT 8
- Wrong x-axis upper limit with date ? HOT 6
- Please add a feature to vary the thickness of the line in Geom.line and Geom.path HOT 1
- Specifying number of ticks HOT 6
- trying to use `Stat.yticks` causes `MethodError`
- Gadfly histogram ignore the bincount (and how to remove background lines) HOT 2
- Gadfly pop up not working in Ubuntu - workaround HOT 1
- How to set the width of the bar? HOT 1
- How to supress output to stdout? HOT 8
- Zooming broken on faceted plots
- Hexbin plotting out of range
- tspan in svg output is malformated HOT 5
- colorkey min/max values HOT 1
- Can't add title to 2D function plot HOT 1
- Gadfly v1.4.0 ?
- SVG does not work with Gadfly 1.4.0 and Compose 0.9.5 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gadfly.jl.