Created
November 15, 2014 17:25
-
-
Save philcleveland/51f74e9285db941091ce to your computer and use it in GitHub Desktop.
Problem get UOM to work in the srm_color method
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
//ounce | |
//gallon | |
[<Measure>] type gal | |
//lovibond | |
[<Measure>] type L | |
//pounds | |
[<Measure>] type lbs | |
//gc = grain color | |
//weight = grain weight in lbs | |
//vol = batch volume in gal | |
//(gc:float) (weight:float) | |
let mcu (arr:(float<L>*float<lbs>)[]) (vol:float<gal>) = | |
let total = | |
arr |> | |
Seq.map(fun x-> | |
let gc, weight = x | |
gc*weight) |> | |
Seq.sum | |
total / vol | |
let srm_color mcu:float<L lbs/gal> = | |
1.4922 * (mcu**0.6859) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment