519 B
519 B
Float
Float は浮動小数値を表す primitive type constraint である。
例
ratio = Float;
threshold = Float default 0.5;
Int との関係
Int と Float は primitive type constraint としては別の型である。
Float constraint は concrete Float を要求し、Int constraint は concrete Int を要求する。
数値演算や比較式では Int と Float を同じ numeric value として扱える。
混在した四則演算の結果は Float になる。