Created
April 21, 2014 18:49
-
-
Save bjartwolf/11152433 to your computer and use it in GitHub Desktop.
2.5.3.fs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let RoundM3 (cubic:decimal<m^3>): decimal<m^3> = Math.Round(cubic * 1m<m^-3>,10)*1m<m^3> | |
let VolumeAIsBEqualssquare((a:decimal<m>), (h:decimal<m>)) = | |
RoundM3 (V h a a) = RoundM3( a * a * h ) | |
let twoDecimals = Arb.generate<decimal<m>> |> Gen.suchThat ((<) 0m<m>) |> Gen.suchThat ((>) 1000000m<m>) |> Gen.two |> Arb.fromGen | |
Check.Quick (Prop.forAll twoDecimals VolumeAIsBEqualssquare) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment