Be concise.
Be useful.
All contributions dictatorially edited by webmasters to match personal tastes.
Please do not paste any copyright violating resource.
Please try to avoid dependencies to third-party libraries and frameworks.
import std.conv : to;
int x; float y = to!float(x); // or float y = cast(float) x;
let y = x as f32;
y = x.to_f
y = x / 1
y = fromInteger x :: Double
var y: single; begin y := x; end;
double y = x.toDouble();
y = float(x)
float y = x;
my $y = $x;
float y = x;
$y = (float) $x;
float y = (float)x;
y = x + .0
let y = x + .0
(defparameter *y* (float x))
real :: y y = x
float y = static_cast<float>(x);
(def y (float x))