Snippets tagged mathematics

  • Combinatorial functions

    Here is my F# take on some combinatorial functions from the book "Introduction to Functional Programming" by Richard Bird and Philip Wadler.

    5 people like this

    Posted: 10 years ago by Cesar Mendoza

  • Calculate PI number

    PI number calculation based on the wikipedia page( I used Newton's , Machine's and Ramanujan's formula. (updated: line 21: Seq.take => Seq.truncate)

    3 people like this

    Posted: 9 years ago by nagat01

  • Primes

    Generates the Prime Number Sequence.

    1 people like this

    Posted: 8 years ago by AdamSpeight2008

  • Generate simple linear equation systems

    Generates simple systems of linear equations, suitable for being solved by someone who's just started learning about them. Change the ranges to make them suitable for solving without a calculator.

    1 people like this

    Posted: 7 years ago by Anonymous

  • Fun with Generic Bit Manipulation

    Some generic functions that use bit manipulation. They work for all signed integer types and are faster than the standard functions min, max, abs and sign.

    2 people like this

    Posted: 5 years ago by Sami Perttu

  • The roller problem solved with a Constraint Programming Solver (CPS)

    This is the solution of a homework the son of a friend had to solve during homeschooling and he asked a couple of his friends on how to solve the following problem: Given a kickboard has three rolls and a city roller has two rolls we want to know *how many kickboards and how many city rollers are parked*. We know two things: * The sum of all the rolls combined is 37 * There are 15 rollers (kickboards and rollers) parked Now being a developer I wanted to solve it via programming. :-D I've used the Decider library which allows you to formulate and solve the problem as following.

    3 people like this

    Posted: 1 month ago by toburger