lynn / elm-arithmetic Goto Github PK
View Code? Open in Web Editor NEWElm library for integer arithmetic and number theory
License: MIT License
Elm library for integer arithmetic and number theory
License: MIT License
Arithmetic.isPrime (1000 ^ 1000)
HANGS SYSTEM
First up - this package looks really useful! I've used Native to change number bases in the past - a pure Elm function is much better.
Is there a reason cbrt and gcd aren't named cubeRoot and greatestCommonDivisor? Seems out of place with the other functions that are in plain English. Perhaps these names are common in MATLAB or numpy, but full English is far more approachable for math noobs like myself.
Only because Project Euler #3 asks for the largest prime factor of 600851475143 (โ6e11) I realized that Arithmetic.primeFactors
does something unexpected when faced with numbers too large to fit in 32 bits:
-- Arithmetic.primeFactors 600851475143
[71,-127237759]
It seems to handle inputs less than or equal to 2^32-1 fine but stumbles on bigger values.
Thank you for this very handy library!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.