Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Elixir

Idiom #79 Convert integer to floating point number

Declare the floating point number y and initialize it with the value of the integer x .

y = x / 1

The / operator always returns a float.
Y : constant Float := Float (X);

New implementation...