 
      
    | You are here | kevinmontrose.com | ||
| | | | | twomorecents.org | |
| | | | | ||
| | | | | sintraworks.github.io | |
| | | | | Sometimes, using floating point arithmetic (e.g using float or double types) just doesn't cut it. Floating point values cannot represent all values accurately, and if you start adding/subtracting/multiplying/dividing such values it is very likely the inacurracies quickly exacerbate into an unworkable mess. Depending on the domain you're working on, different solutions can be appropriate. E.g, if you're working with currency, you might need a type representing decimal numbers, or, if you're working with musical timelines or scores, especially where tuplets (e.g. triplets) come into the mix, a type accurately representing any fraction may be called for. Here we will look into the latter: a type where each instance represents a fraction. We want to be able to perform basic arthmetic calculations on those numbers. | |
| | | | | golb.hplar.ch | |
| | | | | ||
| | | | | www.integralist.co.uk | |
| | | Introduction This post will explain how to set-up and configure the various tooling necessary in order to be able to write cross-compatible modern (ES2015+) JavaScript code. Note: if you're unsure of what 'modern' JavaScript looks like, then I'll refer you to these compatibility tables. The tools we'll be using: Babel: transpiler of modern JS into ES5 compatible code. Webpack: a js module bundler. Note: webpack is actually capable of transforming, bundling, packaging just about anything (as we'll see sho... | ||