Comments (1)
JavaScript does not have "floating point problems", every programming language does arithmetic in conformance with IEEE 754. This is expected behavior.
Internally this conversion is represented as the following:
quantity = 1
ratio = 0.3048 / 0.0254
quantity * ratio
Here is a C program that outputs the exact same thing as Convert:
#include <stdio.h>
int main() {
printf("%0.15f", 1 * (0.3048 / 0.0254));
return 0;
}
from convert.
Related Issues (20)
- Incorrect conversion for cubic meters to cubic feet HOT 1
- Cannot convert from square millimeter to square feet HOT 2
- Return falsy when conversion is not supported HOT 3
- Inaccurate conversion from meters to ft. HOT 1
- proposal: add light year to length HOT 1
- US Legal Cup conversion error HOT 1
- Cannot get KB, MB, etc. units when using "best" for data conversion HOT 2
- Duplicated code and Failure to expand tonnes in mass.ts HOT 1
- Typings can't be found on TypeScript 5 HOT 3
- Library can't handle ASCII char for "micro" (ยต) HOT 2
- [Feature Request]: Support for units of speed and acceleration HOT 2
- Export is not a function in UMD build HOT 1
- The automated release is failing ๐จ HOT 83
- Unexpected result using your example of converting 36 hours to "best" units HOT 2
- Precision error during floating-point conversion HOT 2
- How to Use this library with Ember HOT 1
- meters to feet ratio is wrong HOT 1
- Us feet (ft-us) (U.S. Survey Feet) is not supported
- BTU support HOT 2
- use 'm' for minutes HOT 2
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 convert.