function [ m, e ] = scientific ( x )

%% scientific computes the scientific notation representation of a number.
%
  m = x;
  e = 0;

  if ( 1 <= x && x < 10 )
    return
  end

  while ( m < 1 )
    m = m * 10;
    e = e – 1;
  end

  while ( 10 <= m )
    m = m / 10;
    e = e + 1;
  end

  return
end