Logo

Programming-Idioms

New implementation

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.

Other implementations
  if (s) then
    d = -m * radix(d)**e
  else
    d =  m * radix(d)**e
  end if

uses SysUtils;
d.buildup(s, m, e);
import math
sign = -1 if s else 1
d = math.ldexp(sign*m,e)