All Projects → sharkdp → purescript-quantities

sharkdp / purescript-quantities

Licence: MIT License
Physical quantities and units

Programming Languages

purescript
368 projects
Dhall
116 projects

Projects that are alternatives of or similar to purescript-quantities

Curated resources
📚 Curated lists for programming, books, movies, music, games, etc
Stars: ✭ 116 (+163.64%)
Mutual labels:  math, physics
cpc
Text calculator with support for units and conversion
Stars: ✭ 89 (+102.27%)
Mutual labels:  math, units
Mathjs
An extensive math library for JavaScript and Node.js
Stars: ✭ 11,861 (+26856.82%)
Mutual labels:  math, units
Pynamical
Pynamical is a Python package for modeling and visualizing discrete nonlinear dynamical systems, chaos, and fractals.
Stars: ✭ 458 (+940.91%)
Mutual labels:  math, physics
Mather
A powerful expression-based calculator, unit converter, and general computation engine for Android
Stars: ✭ 49 (+11.36%)
Mutual labels:  math, unit-conversion
Gamephysicscookbook
Source code for Game Physics Cookbook
Stars: ✭ 484 (+1000%)
Mutual labels:  math, physics
Math Science Video Lectures
List of Science courses with video lectures
Stars: ✭ 219 (+397.73%)
Mutual labels:  math, physics
desktop
Extendable calculator for the 21st Century ⚡
Stars: ✭ 85 (+93.18%)
Mutual labels:  math, units
PyAbel
A python package for Abel and inverse Abel transforms
Stars: ✭ 74 (+68.18%)
Mutual labels:  math, physics
good-reads
List of inspiring articles, blogs, tutorials and books. Tech stuff.
Stars: ✭ 14 (-68.18%)
Mutual labels:  math, physics
Quaternion
Add built-in support for quaternions to numpy
Stars: ✭ 387 (+779.55%)
Mutual labels:  math, physics
my-math-notes
All of my math stuff from grad school.
Stars: ✭ 41 (-6.82%)
Mutual labels:  math, physics
Bounce
Bounce is a 3D physics engine for games.
Stars: ✭ 300 (+581.82%)
Mutual labels:  math, physics
Coord Rs
[deprecated] A simple, ergonomic vector mathematics crate for Rust
Stars: ✭ 18 (-59.09%)
Mutual labels:  math, physics
mightyscape-1.X
A maintained extension collection for Inkscape 1.0+, working on Windows and Linux
Stars: ✭ 23 (-47.73%)
Mutual labels:  math, physics
Mathutilities
A collection of some of the neat math and physics tricks that I've collected over the last few years.
Stars: ✭ 2,815 (+6297.73%)
Mutual labels:  math, physics
Insect
High precision scientific calculator with support for physical units
Stars: ✭ 2,469 (+5511.36%)
Mutual labels:  physics, units
mathcore
Advanced .NET math library (.NET Standard).
Stars: ✭ 24 (-45.45%)
Mutual labels:  math, unit-conversion
cas
Cellular Automata Simulator
Stars: ✭ 22 (-50%)
Mutual labels:  math, physics
arogozhnikov.github.io
'Brilliantly wrong' blog, Machine Learning visualizations live here
Stars: ✭ 120 (+172.73%)
Mutual labels:  math, physics

purescript-quantities

A PureScript library to represent and work with physical quantities and units. Note that this library focuses on a representation at run time as opposed to other projects which use the type system to encode physical units at compile time.

Examples

> showResult $ 2.0 .* minute ⊕ 30.0 .* second
"2.5 min"

> showResult $ (85.0 .* mile ./ hour) `convertTo` (meter ./ second)
"37.9984 m/s"

> showResult $ (10.0 .* meter ./ second) `convertTo` (kilo meter ./ hour)
"36 km/h"

> log $ showResult $ (10.0 .* joule) `convertTo` watt
Cannot convert unit 'J' (SI: 'm²·g/s²')
            to unit 'W' (SI: 'm²·g/s³')

> showResult $ sin (90.0 .* degree)
"1"

Calculate the time it takes to download a 2.7GB file on a 6Mbit/s connection:

> let filesize = 2.7 .* giga byte
> let speed = 6.0 .* mega bit ./ second
> showResult $ (filesize ⊘ speed) `convertTo` minute
"60 min"

Calculate the oscillation period T = 2π sqrt(L/g) of a pendulum with length L = 20cm:

> let g = 9.81 .* meter ./ second .^ 2.0
> let length = 20.0 .* centi meter
> let period = scalar 2.0 ⊗ pi ⊗ sqrt (length ⊘ g)

> prettyPrint (fullSimplify period)
"0.89714 s"

Development

npm install
spago -x test.dhall test

Documentation

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].