Coder Social home page Coder Social logo

add's People

Contributors

hiddentao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

add's Issues

RangeErrors

This module causes RangeErrors when used with package linear-algebra. Perhaps too many recursions?

What about multiplication?

Since add is being used for more accurate summations is there something similar which can or should be done for floating point multiplication? I'm not familiar enough with the number theory in this area to know the answer.

Allow values to be specified as parameters

Even though #4 wasn't a massive performance improvement, being able to pass in parameters is more efficient when you have say 2 or 3 values you wish to add and they're not stored in an array. Because it saves having to construct an array.

And inside the add() function we can simply get everything as an array using arguments. If it doesn't impact performance I propose switching the function signature to use parameters. And also note that the upcoming ES6 function splats will make it easier to get a real Array from multiple function parameters.

subtract?

not too familiar with the floating point precision gotchas, does subtract run into this problem as well?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.