russel / Factorial

Various implementations in various languages of factorial(n).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Factorial

This repository contains the factorial function:

f(0) = 1
f(n) = n * f(n - 1), n > 0

coded with a number of different algorithms/implementations in various languages. The purpose is not to provide Factorial as a Service (FaaS), but it to investigate data-driven testing (both example based and property based) in the various languages.

See Also

Rosetta Code is possibly the premier location of examples of coding. For factorial see http://rosettacode.org/wiki/Factorial They are though concerned only with the code of the algorithm, the point of this repository is as much the tests as the algorithms.

Licence

All code in this repository is licenced under the GNU Public Licence version 3 (GPLv3). The licence statement is omitted from the individual files, but applies nontheless. The GPLv3 document file is contained in this repository.

About

Various implementations in various languages of factorial(n).


Languages

Language:Java 14.9%Language:Groovy 13.4%Language:Python 9.9%Language:Kotlin 9.2%Language:Ceylon 7.4%Language:Scala 7.3%Language:Clojure 7.1%Language:Chapel 6.6%Language:C++ 5.2%Language:Rust 2.9%Language:C# 2.7%Language:Go 2.6%Language:Haskell 2.0%Language:C 1.8%Language:D 1.8%Language:Pony 1.5%Language:Meson 1.2%Language:Frege 1.1%Language:Erlang 1.0%Language:CMake 0.5%Language:Prolog 0.1%