<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, How to write a procedure to determine if values are length of a triangle?</title>
    <link>http://www.mapleprimes.com/questions/143681-How-To-Write-A-Procedure-To-Determine</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Tue, 09 Jun 2026 10:03:04 GMT</lastBuildDate>
    <pubDate>Tue, 09 Jun 2026 10:03:04 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, How to write a procedure to determine if values are length of a triangle?</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, How to write a procedure to determine if values are length of a triangle?</title>
      <link>http://www.mapleprimes.com/questions/143681-How-To-Write-A-Procedure-To-Determine</link>
    </image>
    <item>
      <title>Need a comma</title>
      <link>http://www.mapleprimes.com/questions/143681-How-To-Write-A-Procedure-To-Determine?ref=Feed:MaplePrimes:How to write a procedure to determine if values are length of a triangle?:Comments#answer143682</link>
      <itunes:summary>&lt;p&gt;Your immediate problem is that you need a comma after the &lt;strong&gt;c&lt;/strong&gt; in the &lt;strong&gt;print&lt;/strong&gt; statement.&lt;/p&gt;
&lt;p&gt;But, also, your algorithm is incorrect in two ways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You can't assume that &lt;strong&gt;c&lt;/strong&gt; is the largest of the three numbers.&lt;/li&gt;
&lt;li&gt;The formula &lt;strong&gt;a^2 + b^2 = c^2&lt;/strong&gt; only applies to right triangles.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The correct algorithm is that the sum of the two smaller sides must be greater than the largest side.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Your immediate problem is that you need a comma after the &lt;strong&gt;c&lt;/strong&gt; in the &lt;strong&gt;print&lt;/strong&gt; statement.&lt;/p&gt;
&lt;p&gt;But, also, your algorithm is incorrect in two ways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You can't assume that &lt;strong&gt;c&lt;/strong&gt; is the largest of the three numbers.&lt;/li&gt;
&lt;li&gt;The formula &lt;strong&gt;a^2 + b^2 = c^2&lt;/strong&gt; only applies to right triangles.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The correct algorithm is that the sum of the two smaller sides must be greater than the largest side.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
      <guid>143682</guid>
      <pubDate>Wed, 20 Feb 2013 03:03:57 Z</pubDate>
      <itunes:author>Carl Love</itunes:author>
      <author>Carl Love</author>
    </item>
    <item>
      <title>declarations</title>
      <link>http://www.mapleprimes.com/questions/143681-How-To-Write-A-Procedure-To-Determine?ref=Feed:MaplePrimes:How to write a procedure to determine if values are length of a triangle?:Comments#answer143686</link>
      <itunes:summary>&lt;p&gt;Another issue is that the declaration of the parameters is wrong. &amp;nbsp;As given, only parameter c is type-checked. &amp;nbsp;You want&lt;/p&gt;
&lt;p&gt;proc( a :: positive, b :: positive, c :: positive ) ... end proc&lt;/p&gt;
&lt;p&gt;Note that this declaration won't allow, say, IsTriange(1,2,Pi), since Pi is not considered numeric; whether you want to allow that is up to you. &amp;nbsp;If you do, you might declare them as type realcons, then inside the procedure convert them to floats with evalf, check that they are positive, then check that the longest is shorter than the sum of the other two.&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Another issue is that the declaration of the parameters is wrong. &amp;nbsp;As given, only parameter c is type-checked. &amp;nbsp;You want&lt;/p&gt;
&lt;p&gt;proc( a :: positive, b :: positive, c :: positive ) ... end proc&lt;/p&gt;
&lt;p&gt;Note that this declaration won't allow, say, IsTriange(1,2,Pi), since Pi is not considered numeric; whether you want to allow that is up to you. &amp;nbsp;If you do, you might declare them as type realcons, then inside the procedure convert them to floats with evalf, check that they are positive, then check that the longest is shorter than the sum of the other two.&lt;/p&gt;</description>
      <guid>143686</guid>
      <pubDate>Wed, 20 Feb 2013 04:45:45 Z</pubDate>
      <itunes:author>Joe Riel</itunes:author>
      <author>Joe Riel</author>
    </item>
  </channel>
</rss>