Difference between revisions of "Physical units/CalDims"

From HaskellWiki
Jump to navigation Jump to search
Line 1: Line 1:
 
The motivation for writing CalDims was to have an easy to use calculation tool that has support for units.
 
The motivation for writing CalDims was to have an easy to use calculation tool that has support for units.
   
==The calculator's features==
+
== The calculator's features ==
   
 
* Support for user defined basic units and derrived units
 
* Support for user defined basic units and derrived units
Line 10: Line 10:
 
* easy unit-conversion
 
* easy unit-conversion
   
  +
== Example session ==
==Planned features for future releases==
 
   
  +
<haskell>
* More datatypes (boolean, string)
 
  +
> # A bird is moving 1 meter per second, how far will it be in 2 hours?
* a worksheet GUI
 
  +
> 1m/s * 2h | m
* Undo/Redo
 
  +
7200 m
  +
> # A 60 Watt electric light is burning 2 hours a day. How much energy is consumed in one week?
  +
> 60 W * 2 h / d * 7 d | J
  +
3024000 J
  +
> # What's that in Watt hours?
  +
> 60 W * 2 h / d * 7 d | W h
  +
840 W h
  +
> #How much is it in a year (we derrive `year` first)
  +
> year := 265 d
  +
ok.
  +
> 60 W * 2 h / d * 1 year | W h
  +
31799.999999999996 W h
  +
> # Bits and bytes are not defined. We do so:
  +
> \u bit
  +
ok, but an object has changed
  +
> byte := 8 bit
  +
ok, but an object has changed
  +
> kbyte := 1024 byte
  +
ok.
  +
> mbyte := 1024 kbyte
  +
ok.
  +
> 2 mbyte | -
  +
16777216 bit
  +
> 2 mbyte | kbyte
  +
2048 kbyte
  +
</haskell>
 
== Sources ==
   
 
darcs http://tel.netbeisser.de/darcs/CalDims
==Releases==
 
   
  +
darcs http://tel.netbeisser.de/darcs/CalDimsApps
Current release is 1.0 rc1. It fixes some bugs that are in (deprecated) 0.9
 
   
Sources:
 
 
http://m13s07.vlinux.de/releases/CalDims/1.0/CalDims-1.0rc1.tar.gz
 
 
Binary for Linux x86-32:
 
 
http://m13s07.vlinux.de/releases/CalDims/1.0/caldims
 
 
==Contact==
 
 
The darcs repository is at
 
 
darcs http://m13s07.vlinux.de/darcs/CalDims
 
   
 
[[Category:Applications]]
 
[[Category:Applications]]

Revision as of 11:41, 24 September 2007

The motivation for writing CalDims was to have an easy to use calculation tool that has support for units.

The calculator's features

  • Support for user defined basic units and derrived units
  • user defined functions
  • work sheets can be modified/saved via shell
  • (1/3)*3 == 1 (No rounding errors)
  • built-in feature to simplify units
  • easy unit-conversion

Example session

> # A bird is moving 1 meter per second, how far will it be in 2 hours?
> 1m/s * 2h | m
7200 m
> # A 60 Watt electric light is burning 2 hours a day. How much energy is consumed in one week?
> 60 W * 2 h / d * 7 d | J
3024000 J
> # What's that in Watt hours?
> 60 W * 2 h / d * 7 d | W h
840 W h
> #How much is it in a year (we derrive `year` first)
> year := 265 d
ok.
> 60 W * 2 h / d * 1 year | W h
31799.999999999996 W h
> # Bits and bytes are not defined. We do so:
> \u bit
ok, but an object has changed
> byte := 8 bit
ok, but an object has changed
> kbyte := 1024 byte
ok.
> mbyte := 1024 kbyte
ok.
> 2 mbyte | -
16777216 bit
> 2 mbyte | kbyte
2048 kbyte

Sources

darcs http://tel.netbeisser.de/darcs/CalDims

darcs http://tel.netbeisser.de/darcs/CalDimsApps