<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240584</link>
    <title>MATLAB Central Newsreader - robust truncation at n decimal places</title>
    <description>Feed for thread: robust truncation at n decimal places</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Sun, 07 Dec 2008 03:42:44 -0500</pubDate>
      <title>robust truncation at n decimal places</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240584#615498</link>
      <author>Felipe G. Nievinski</author>
      <description>Hi. Given&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x = 0.99899998&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;y = 0.99900000&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;za = sscanf(sprintf('%.7f\n',x), '%f')&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;zb = fix(x./10^-7).*10^-7&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;za == y&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;zb == y&lt;br&gt;
then za == y is true, but zb == y is false.&lt;br&gt;
As you see, it's possible to perform a robust truncation at n decimal&lt;br&gt;
places through conversion to/from character string. I was trying to&lt;br&gt;
achive the same using computationally cheaper double precision&lt;br&gt;
arithmetic, without success. Is that it or am I missing something?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Felipe.</description>
    </item>
    <item>
      <pubDate>Sun, 07 Dec 2008 05:53:02 -0500</pubDate>
      <title>Re: robust truncation at n decimal places</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240584#615503</link>
      <author>Roger Stafford</author>
      <description>&quot;Felipe G. Nievinski&quot; &amp;lt;fgnievinski@gmail.com&amp;gt; wrote in message &amp;lt;545015a5-3f51-41e3-a40b-1cf7db531b11@35g2000pry.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi. Given&lt;br&gt;
&amp;gt;     x = 0.99899998&lt;br&gt;
&amp;gt;     y = 0.99900000&lt;br&gt;
&amp;gt;     za = sscanf(sprintf('%.7f\n',x), '%f')&lt;br&gt;
&amp;gt;     zb = fix(x./10^-7).*10^-7&lt;br&gt;
&amp;gt;     za == y&lt;br&gt;
&amp;gt;     zb == y&lt;br&gt;
&amp;gt; then za == y is true, but zb == y is false.&lt;br&gt;
&amp;gt; As you see, it's possible to perform a robust truncation at n decimal&lt;br&gt;
&amp;gt; places through conversion to/from character string. I was trying to&lt;br&gt;
&amp;gt; achive the same using computationally cheaper double precision&lt;br&gt;
&amp;gt; arithmetic, without success. Is that it or am I missing something?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks,&lt;br&gt;
&amp;gt; Felipe.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;Your 'fix' is doing truncation - that is to say, rounding toward zero - whereas sprintf('%.7f\n',x) is doing a round to nearest.  It's not surprising you get different answers.  Also for better accuracy you should be multiplying by 10^7 instead of dividing by 10^-7 and then dividing by 10^7 instead of multiplying by 10^-7, because the number 10^-7 cannot be represented precisely with binary floating point numbers.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;Nevertheless even with these corrections, you probably cannot count on always getting precisely the same answers clear out to the 53rd binary place unless you know exactly how sprintf's and sscanf's algorithms work.  You should be making comparison like abs(za-zb) &amp;lt; tol where tol is something like 10^-15*abs(x)&lt;br&gt;
&lt;br&gt;
Roger Stafford</description>
    </item>
    <item>
      <pubDate>Sun, 07 Dec 2008 09:26:53 -0500</pubDate>
      <title>Re: robust truncation at n decimal places</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240584#615513</link>
      <author>Felipe G. Nievinski</author>
      <description>On Dec 6, 10:53 pm, &quot;Roger Stafford&quot;&lt;br&gt;
&amp;lt;ellieandrogerxy...@mindspring.com.invalid&amp;gt; wrote:&lt;br&gt;
&amp;gt; &quot;Felipe G. Nievinski&quot; &amp;lt;fgnievin...@gmail.com&amp;gt; wrote in message &amp;lt;545015a5-=&lt;br&gt;
3f51-41e3-a40b-1cf7db531...@35g2000pry.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Hi. Given&lt;br&gt;
&amp;gt; &amp;gt;     x =3D 0.99899998&lt;br&gt;
&amp;gt; &amp;gt;     y =3D 0.99900000&lt;br&gt;
&amp;gt; &amp;gt;     za =3D sscanf(sprintf('%.7f\n',x), '%f')&lt;br&gt;
&amp;gt; &amp;gt;     zb =3D fix(x./10^-7).*10^-7&lt;br&gt;
&amp;gt; &amp;gt;     za =3D=3D y&lt;br&gt;
&amp;gt; &amp;gt;     zb =3D=3D y&lt;br&gt;
&amp;gt; &amp;gt; then za =3D=3D y is true, but zb =3D=3D y is false.&lt;br&gt;
&amp;gt; &amp;gt; As you see, it's possible to perform a robust truncation at n decimal&lt;br&gt;
&amp;gt; &amp;gt; places through conversion to/from character string. I was trying to&lt;br&gt;
&amp;gt; &amp;gt; achive the same using computationally cheaper double precision&lt;br&gt;
&amp;gt; &amp;gt; arithmetic, without success. Is that it or am I missing something?&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; &amp;gt; Thanks,&lt;br&gt;
&amp;gt; &amp;gt; Felipe.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;   Your 'fix' is doing truncation - that is to say, rounding toward zero -=&lt;br&gt;
&amp;nbsp;whereas sprintf('%.7f\n',x) is doing a round to nearest.  It's not surpris=&lt;br&gt;
ing you get different answers.  Also for better accuracy you should be mult=&lt;br&gt;
iplying by 10^7 instead of dividing by 10^-7 and then dividing by 10^7 inst=&lt;br&gt;
ead of multiplying by 10^-7, because the number 10^-7 cannot be represented=&lt;br&gt;
&amp;nbsp;precisely with binary floating point numbers.&lt;br&gt;
&amp;gt;&lt;br&gt;
Thanks for indicating the round-like behavior of sprintf -- I was&lt;br&gt;
overlooking that. Now I get the expected result for the particular x&lt;br&gt;
value I gave:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x =3D 0.99899998&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;y =3D 0.99900000&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;za =3D sscanf(sprintf('%.7f\n',x), '%f')&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;zb =3D round(x./10^-7).*10^-7&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;za =3D=3D y&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;zb =3D=3D y&lt;br&gt;
&lt;br&gt;
Then I ran the code for another test cases.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x =3D 257104079.99899998&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;y =3D 257104079.9990000&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;za =3D sscanf(sprintf('%.7f\n',x), '%f')&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;zb =3D round(x.*10^7)./10^7&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;za =3D=3D y&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;zb =3D=3D y&lt;br&gt;
The test above would only pass after I've replaced x*10^-7 by x/(10^7)&lt;br&gt;
-- it's interesting that the two operations are not equivalent.&lt;br&gt;
&lt;br&gt;
But for the test below the algorithm fails:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x =3D 257098540.00000003&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;y =3D 257098540.0000000&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;za =3D sscanf(sprintf('%.7f\n',x), '%f')&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;zb =3D round(x.*10^7)./10^7&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;za =3D=3D y&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;zb =3D=3D y&lt;br&gt;
:-(&lt;br&gt;
&lt;br&gt;
&amp;gt;   Nevertheless even with these corrections, you probably cannot count on =&lt;br&gt;
always getting precisely the same answers clear out to the 53rd binary plac=&lt;br&gt;
e unless you know exactly how sprintf's and sscanf's algorithms work.&lt;br&gt;
Actually, sprintf can be dismissed in the comparisons above, because I&lt;br&gt;
know the answer I expect, e.g.,&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;in   =3D 257098540.00000003&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;out =3D 257098540.0000000&lt;br&gt;
I've only included sprintf to demonstrate that what I need is not&lt;br&gt;
impossible, even in a finite precision computer. You're right that if&lt;br&gt;
sprintf can do it, there must be a way to do it -- I hope without&lt;br&gt;
going to/from character strings.&lt;br&gt;
&lt;br&gt;
Maybe dissecting the floating-point number into exponent and mantissa?&lt;br&gt;
I tried this, using [f,e]=3Dlog2(x), where x =3D f * 2^e,:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;x =3D 257098540.00000003&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;y =3D 257098540.0000000&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;za =3D sscanf(sprintf('%.7f\n',x), '%f')&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;zb =3D round(x.*10^7)./10^7&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[f,e] =3D log2(x);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f =3D f*10^7;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;temp =3D pow2(f, e);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;temp =3D round(temp);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[f,e] =3D log2(temp);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f =3D f/10^7;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;zc =3D pow2(f, e)&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;za =3D=3D y&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;zb =3D=3D y&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;zc =3D=3D y&lt;br&gt;
But it failed the test, too. For the time being I have to keep using&lt;br&gt;
the costly sprintf/scanf solution, simply because it's the only one&lt;br&gt;
that I know of passing all test cases.&lt;br&gt;
&lt;br&gt;
&amp;gt; You should be making comparison like abs(za-zb) &amp;lt; tol where tol is someth=&lt;br&gt;
ing like 10^-15*abs(x)&lt;br&gt;
&amp;gt;&lt;br&gt;
Usually I compare two floating point numbers as you prescribe, but for&lt;br&gt;
this particular application I need exact equality: I input two vectors&lt;br&gt;
containing time tags into intersect() to find the common epochs, and&lt;br&gt;
intersect internally relies on ismember(), which checks for exact&lt;br&gt;
equality between vector elements. I could try to generalize ismember()&lt;br&gt;
-- in the past, I've generalized unique(x, tol) -- but since my input&lt;br&gt;
data is given at finite precision, I find it reasonable to expect&lt;br&gt;
exact equality, after rounding/truncation. (My time tags are given in&lt;br&gt;
the format year month day hour minute seconds -- all fields are&lt;br&gt;
integers except seconds, which has seven decimal places. I end up with&lt;br&gt;
decimals beyond the seventh place because I convert them through&lt;br&gt;
datenum()).&lt;br&gt;
&lt;br&gt;
Thanks a lot for your ideas.&lt;br&gt;
&lt;br&gt;
Felipe.</description>
    </item>
    <item>
      <pubDate>Sun, 07 Dec 2008 12:24:23 -0500</pubDate>
      <title>Re: robust truncation at n decimal places</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240584#615522</link>
      <author>Martin Eisenberg</author>
      <description>Felipe G. Nievinski wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt; I could try to generalize ismember() -- in the past, I've&lt;br&gt;
&amp;gt; generalized unique(x, tol) -- but since my input data is given at&lt;br&gt;
&amp;gt; finite precision, I find it reasonable to expect exact equality,&lt;br&gt;
&amp;gt; after rounding/truncation. (My time tags are given in the format&lt;br&gt;
&amp;gt; year month day hour minute seconds -- all fields are integers&lt;br&gt;
&amp;gt; except seconds, which has seven decimal places. I end up with&lt;br&gt;
&amp;gt; decimals beyond the seventh place because I convert them&lt;br&gt;
&amp;gt; through datenum()).&lt;br&gt;
&lt;br&gt;
Narrowly construed, what you want is impossible because for any given &lt;br&gt;
number of decimal digits, many numbers thus representable don't have &lt;br&gt;
terminating (but only periodic) binary expansions. What is your &lt;br&gt;
seconds field's original representation? Does the path it takes &lt;br&gt;
warrant the idea of containing exactly seven decimal places by the &lt;br&gt;
time you get to the current point?&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Martin&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Quidquid latine scriptum est, altum videtur.</description>
    </item>
    <item>
      <pubDate>Sun, 07 Dec 2008 16:51:54 -0500</pubDate>
      <title>Re: robust truncation at n decimal places</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240584#615539</link>
      <author>Felipe G. Nievinski</author>
      <description>On Dec 7, 5:24=A0am, Martin Eisenberg &amp;lt;martin.eisenb...@udo.edu&amp;gt; wrote:&lt;br&gt;
&amp;gt; Felipe G. Nievinski wrote:&lt;br&gt;
&amp;gt; &amp;gt; I could try to generalize ismember() -- in the past, I've&lt;br&gt;
&amp;gt; &amp;gt; generalized unique(x, tol) -- but since my input data is given at&lt;br&gt;
&amp;gt; &amp;gt; finite precision, I find it reasonable to expect exact equality,&lt;br&gt;
&amp;gt; &amp;gt; after rounding/truncation. (My time tags are given in the format&lt;br&gt;
&amp;gt; &amp;gt; year month day hour minute seconds -- all fields are integers&lt;br&gt;
&amp;gt; &amp;gt; except seconds, which has seven decimal places. I end up with&lt;br&gt;
&amp;gt; &amp;gt; decimals beyond the seventh place because I convert them&lt;br&gt;
&amp;gt; &amp;gt; through datenum()).&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Narrowly construed, what you want is impossible&lt;br&gt;
Well, what I want (as defined in the test cases above) is possible&lt;br&gt;
with sprintf/sscanf -- I'm just looking for a computationally cheaper&lt;br&gt;
algorithm, avoiding conversion to/from char strings.&lt;br&gt;
&lt;br&gt;
&amp;gt; because for any given&lt;br&gt;
&amp;gt; number of decimal digits, many numbers thus representable don't have&lt;br&gt;
&amp;gt; terminating (but only periodic) binary expansions. What is your&lt;br&gt;
&amp;gt; seconds field's original representation?&lt;br&gt;
Seconds are given as a base 10 decimal number with seven significant&lt;br&gt;
figures, e.g., 14.9999999 s.&lt;br&gt;
Perhaps it's important to mention that my events are widely spaced in&lt;br&gt;
time (e.g., usually 1 s apart) compared to the time tags precision&lt;br&gt;
(1e-7 s).&lt;br&gt;
&lt;br&gt;
&amp;gt; Does the path it takes&lt;br&gt;
&amp;gt; warrant the idea of containing exactly seven decimal places by the&lt;br&gt;
&amp;gt; time you get to the current point?&lt;br&gt;
&amp;gt;&lt;br&gt;
I don't understand what you mean by &quot;path&quot;.&lt;br&gt;
&lt;br&gt;
Thanks for your comments.&lt;br&gt;
&lt;br&gt;
I'm still on the lookout for a robust rounding without sprintf/sscanf,&lt;br&gt;
though.&lt;br&gt;
&lt;br&gt;
Felipe.</description>
    </item>
    <item>
      <pubDate>Sun, 07 Dec 2008 23:43:46 -0500</pubDate>
      <title>Re: robust truncation at n decimal places</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240584#615571</link>
      <author>Martin Eisenberg</author>
      <description>Felipe G. Nievinski wrote:&lt;br&gt;
&amp;gt; On Dec 7, 5:24</description>
    </item>
    <item>
      <pubDate>Fri, 23 Jul 2010 22:43:05 -0400</pubDate>
      <title>Re: robust truncation at n decimal places</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/240584#765208</link>
      <author>Keegan </author>
      <description>Felipe, this is from:&lt;br&gt;
&lt;a href=&quot;http://home.online.no/~pjacklam/matlab/software/util/fullindex.html&quot;&gt;http://home.online.no/~pjacklam/matlab/software/util/fullindex.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
function y = fixdec(x, n)&lt;br&gt;
%FIXDEC Round towards zero with a specified number of decimals.&lt;br&gt;
%&lt;br&gt;
%   Y = FIXDEC(X, N) rounds the elements of X to N decimals.&lt;br&gt;
%&lt;br&gt;
%   For instance, fixdec(10*sqrt(2) + i*pi/10, 4) returns 14.1421 + 0.3141i&lt;br&gt;
%&lt;br&gt;
%   See also: FIX, FLOOR, CEIL, ROUND, FIXDIG, ROUNDDEC, ROUNDDIG.&lt;br&gt;
&lt;br&gt;
%   Author:      Peter J. Acklam&lt;br&gt;
%   Time-stamp:  2004-09-22 20:08:10 +0200&lt;br&gt;
%   E-mail:      pjacklam@online.no&lt;br&gt;
%   URL:         &lt;a href=&quot;http://home.online.no/~pjacklam&quot;&gt;http://home.online.no/~pjacklam&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;% Check number of input arguments.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;error(nargchk(2, 2, nargin));&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;% Quick exit if either argument is empty.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;if isempty(x) || isempty(n)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;y = [];&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;% Get size of input arguments.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;size_x   = size(x);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;size_n   = size(n);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;scalar_x = all(size_x == 1);           % True if x is a scalar.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;scalar_n = all(size_n == 1);           % True if n is a scalar.&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;% Check size of input arguments.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;if ~scalar_x &amp; ~scalar_n &amp; ~isequal(size_x, size_n)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;error(['When both arguments are non-scalars they must have' ...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;' the same size']);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;f = 10.^n;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;y = fix(x .* f) ./ f;</description>
    </item>
  </channel>
</rss>

