<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Gem #7: The Beauty of Numeric Literals in Ada</title>
	<atom:link href="http://www.adacore.com/2007/06/25/ada-gem-7/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.adacore.com/2007/06/25/ada-gem-7/</link>
	<description>AdaCore technology and news</description>
	<lastBuildDate>Sat, 31 Jul 2010 23:01:06 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ville Witt</title>
		<link>http://www.adacore.com/2007/06/25/ada-gem-7/comment-page-1/#comment-141</link>
		<dc:creator>Ville Witt</dc:creator>
		<pubDate>Mon, 03 Sep 2007 23:28:50 +0000</pubDate>
		<guid isPermaLink="false">http://www2.adacore.com/2007/06/25/ada-gem-7/#comment-141</guid>
		<description>Dear Mr. Francisco J. Montoya:
Zero is guaranteed to be 0, because 3.0 * One_Third is 1 exactly. This is to show that One_Third is really 1/3, and not (with finite decimals of 3) 0.333

What is 0.333 + 0.333 + 0.333 ? It&#039;s of cause 0.999.
But if you mean 1/3 + 1/3 + 1/3 you suspect the result to be 1. Ada let you stop wondering about the amounts of bit of the target architecture, and instead explain to the compile what you really mean.

Sincerly Ville Witt (.net)

P.S.: I&#039;m sorry if I was wrong about the above - I myself is quite new to Ada and is fascinated by it. We need people to update their Ada-on-Linux tutorials!</description>
		<content:encoded><![CDATA[<p>Dear Mr. Francisco J. Montoya:<br />
Zero is guaranteed to be 0, because 3.0 * One_Third is 1 exactly. This is to show that One_Third is really 1/3, and not (with finite decimals of 3) 0.333</p>
<p>What is 0.333 + 0.333 + 0.333 ? It&#8217;s of cause 0.999.<br />
But if you mean 1/3 + 1/3 + 1/3 you suspect the result to be 1. Ada let you stop wondering about the amounts of bit of the target architecture, and instead explain to the compile what you really mean.</p>
<p>Sincerly Ville Witt (.net)</p>
<p>P.S.: I&#8217;m sorry if I was wrong about the above &#8211; I myself is quite new to Ada and is fascinated by it. We need people to update their Ada-on-Linux tutorials!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Francisco J. Montoya</title>
		<link>http://www.adacore.com/2007/06/25/ada-gem-7/comment-page-1/#comment-77</link>
		<dc:creator>Francisco J. Montoya</dc:creator>
		<pubDate>Wed, 01 Aug 2007 14:37:57 +0000</pubDate>
		<guid isPermaLink="false">http://www2.adacore.com/2007/06/25/ada-gem-7/#comment-77</guid>
		<description>Hello, Franco.

I&#039;m not sure whether I understood correctly that of &quot;infinite precision&quot; in compilation-time computations related to literals.

In the line:

   Zero : constant := 1.0 - 3.0 * One_Third;

, Zero is guaranteed to be 0.0 due only to the nature of the right-side operands of &quot;:=&quot;, or to the nature of the left-side argument (because Zero is a named number, and not a typed constant), or for both reasons?

I mean, would it be 0.0 in the same way if Zero were a floating-point typed constant, instead of a named number?

Thank you for your gem :-)

--
Francisco J. Montoya</description>
		<content:encoded><![CDATA[<p>Hello, Franco.</p>
<p>I&#8217;m not sure whether I understood correctly that of &#8220;infinite precision&#8221; in compilation-time computations related to literals.</p>
<p>In the line:</p>
<p>   Zero : constant := 1.0 &#8211; 3.0 * One_Third;</p>
<p>, Zero is guaranteed to be 0.0 due only to the nature of the right-side operands of &#8220;:=&#8221;, or to the nature of the left-side argument (because Zero is a named number, and not a typed constant), or for both reasons?</p>
<p>I mean, would it be 0.0 in the same way if Zero were a floating-point typed constant, instead of a named number?</p>
<p>Thank you for your gem :-)</p>
<p>&#8211;<br />
Francisco J. Montoya</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christoph Grein</title>
		<link>http://www.adacore.com/2007/06/25/ada-gem-7/comment-page-1/#comment-32</link>
		<dc:creator>Christoph Grein</dc:creator>
		<pubDate>Fri, 29 Jun 2007 11:21:09 +0000</pubDate>
		<guid isPermaLink="false">http://www2.adacore.com/2007/06/25/ada-gem-7/#comment-32</guid>
		<description>Not so good if you consider that capitalisation is generally looked upon as something optional.

4 mS is Millisiemens, not milliseconds (which is meant and I see often).

And on some devices, there are (still) no lower case characters.

So what would 10 MB mean?</description>
		<content:encoded><![CDATA[<p>Not so good if you consider that capitalisation is generally looked upon as something optional.</p>
<p>4 mS is Millisiemens, not milliseconds (which is meant and I see often).</p>
<p>And on some devices, there are (still) no lower case characters.</p>
<p>So what would 10 MB mean?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Heaney</title>
		<link>http://www.adacore.com/2007/06/25/ada-gem-7/comment-page-1/#comment-31</link>
		<dc:creator>Matthew Heaney</dc:creator>
		<pubDate>Fri, 29 Jun 2007 10:44:54 +0000</pubDate>
		<guid isPermaLink="false">http://www2.adacore.com/2007/06/25/ada-gem-7/#comment-31</guid>
		<description>The convention we use in the US is:

kb = 1000
Kb = 1024

mb = 1000^2
Mb = 1024^2

etc</description>
		<content:encoded><![CDATA[<p>The convention we use in the US is:</p>
<p>kb = 1000<br />
Kb = 1024</p>
<p>mb = 1000^2<br />
Mb = 1024^2</p>
<p>etc</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christoph Grein</title>
		<link>http://www.adacore.com/2007/06/25/ada-gem-7/comment-page-1/#comment-30</link>
		<dc:creator>Christoph Grein</dc:creator>
		<pubDate>Fri, 29 Jun 2007 06:39:24 +0000</pubDate>
		<guid isPermaLink="false">http://www2.adacore.com/2007/06/25/ada-gem-7/#comment-30</guid>
		<description>&quot;When I learnt all of this - in the late 70s - a kilobyte was 1_024 bytes. I found this kind of cute at the time and also kind of confusing. 
...
I wonder whether it is common practice these days
to talk about kilobinary bytes (or kibibytes :)&quot;

No, I haven&#039;t ever heard someone use these prefixes, which is kind of sad because of the confusion you mention.

So I begin to spread the (old) news :-)</description>
		<content:encoded><![CDATA[<p>&#8220;When I learnt all of this &#8211; in the late 70s &#8211; a kilobyte was 1_024 bytes. I found this kind of cute at the time and also kind of confusing.<br />
&#8230;<br />
I wonder whether it is common practice these days<br />
to talk about kilobinary bytes (or kibibytes :)&#8221;</p>
<p>No, I haven&#8217;t ever heard someone use these prefixes, which is kind of sad because of the confusion you mention.</p>
<p>So I begin to spread the (old) news :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Franco Gasperoni</title>
		<link>http://www.adacore.com/2007/06/25/ada-gem-7/comment-page-1/#comment-29</link>
		<dc:creator>Franco Gasperoni</dc:creator>
		<pubDate>Thu, 28 Jun 2007 16:33:46 +0000</pubDate>
		<guid isPermaLink="false">http://www2.adacore.com/2007/06/25/ada-gem-7/#comment-29</guid>
		<description>When I learnt all of this - in the late 70s - a kilobyte was 1_024 bytes. I found this kind of cute at the time and also kind of confusing. 

Thank you Christoph for bringing me up to date on this.

I wonder whether it is common practice these days
to talk about kilobinary bytes (or kibibytes :)

By the way for everyone&#039;s benefit on page:

    &lt;a href=&quot;http://physics.nist.gov/cuu/Units/prefixes.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://physics.nist.gov/cuu/Units/prefixes.html&lt;/a&gt;

NIST writes:

    Because the SI prefixes strictly represent powers
    of 10, they should not be used to represent powers
    of 2. Thus, one kilobit, or 1 kbit, is 1_000 bit and
    not 210 bit = 1_024 bit. To alleviate this ambiguity,
    prefixes for binary multiples have been adopted by
    the International Electrotechnical Commission (IEC)
    for use in information technology.

See

&lt;a href=&quot;http://physics.nist.gov/cuu/Units/binary.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://physics.nist.gov/cuu/Units/binary.html&lt;/a&gt;

for the details.

I have changed the variable names so now instead of Kilobyte I use Kilobinary :)</description>
		<content:encoded><![CDATA[<p>When I learnt all of this &#8211; in the late 70s &#8211; a kilobyte was 1_024 bytes. I found this kind of cute at the time and also kind of confusing. </p>
<p>Thank you Christoph for bringing me up to date on this.</p>
<p>I wonder whether it is common practice these days<br />
to talk about kilobinary bytes (or kibibytes :)</p>
<p>By the way for everyone&#8217;s benefit on page:</p>
<p>    <a href="http://physics.nist.gov/cuu/Units/prefixes.html" target="_blank" rel="nofollow">http://physics.nist.gov/cuu/Units/prefixes.html</a></p>
<p>NIST writes:</p>
<p>    Because the SI prefixes strictly represent powers<br />
    of 10, they should not be used to represent powers<br />
    of 2. Thus, one kilobit, or 1 kbit, is 1_000 bit and<br />
    not 210 bit = 1_024 bit. To alleviate this ambiguity,<br />
    prefixes for binary multiples have been adopted by<br />
    the International Electrotechnical Commission (IEC)<br />
    for use in information technology.</p>
<p>See</p>
<p><a href="http://physics.nist.gov/cuu/Units/binary.html" target="_blank" rel="nofollow">http://physics.nist.gov/cuu/Units/binary.html</a></p>
<p>for the details.</p>
<p>I have changed the variable names so now instead of Kilobyte I use Kilobinary :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christoph Grein</title>
		<link>http://www.adacore.com/2007/06/25/ada-gem-7/comment-page-1/#comment-27</link>
		<dc:creator>Christoph Grein</dc:creator>
		<pubDate>Thu, 28 Jun 2007 05:38:06 +0000</pubDate>
		<guid isPermaLink="false">http://www2.adacore.com/2007/06/25/ada-gem-7/#comment-27</guid>
		<description>Oops, your program ate the NIST address &lt;a href=&quot;http://physics.nist.gov/cuu/Units/prefixes.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://physics.nist.gov/cuu/Units/prefixes.html&lt;/a&gt;
because I encluded it in &quot;smaller&quot; - &quot;greater&quot; brackets. Please see there for binary and decimal prefixes.</description>
		<content:encoded><![CDATA[<p>Oops, your program ate the NIST address <a href="http://physics.nist.gov/cuu/Units/prefixes.html" target="_blank" rel="nofollow">http://physics.nist.gov/cuu/Units/prefixes.html</a><br />
because I encluded it in &#8220;smaller&#8221; &#8211; &#8220;greater&#8221; brackets. Please see there for binary and decimal prefixes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christoph Grein</title>
		<link>http://www.adacore.com/2007/06/25/ada-gem-7/comment-page-1/#comment-26</link>
		<dc:creator>Christoph Grein</dc:creator>
		<pubDate>Thu, 28 Jun 2007 05:32:59 +0000</pubDate>
		<guid isPermaLink="false">http://www2.adacore.com/2007/06/25/ada-gem-7/#comment-26</guid>
		<description>Franco,

today, on the day of the Lord, the 7#40.6.5565#, I have to tell you the sad truth  that your numbers like Kilobyte are wrong.

  Kilobyte = 1 kB = 10#1#e3 B, always,

see .

What you mean is Kibibyte = 1 KiB = 2#1#e10 B.

Please note the capitalisation: k kilo, Ki kilobinary.

It really makes a difference if you have 1 GiB or 1 GB. The difference amounts to 7#1_553_536_512# B.

Christoph ;-)</description>
		<content:encoded><![CDATA[<p>Franco,</p>
<p>today, on the day of the Lord, the 7#40.6.5565#, I have to tell you the sad truth  that your numbers like Kilobyte are wrong.</p>
<p>  Kilobyte = 1 kB = 10#1#e3 B, always,</p>
<p>see .</p>
<p>What you mean is Kibibyte = 1 KiB = 2#1#e10 B.</p>
<p>Please note the capitalisation: k kilo, Ki kilobinary.</p>
<p>It really makes a difference if you have 1 GiB or 1 GB. The difference amounts to 7#1_553_536_512# B.</p>
<p>Christoph ;-)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
