<div dir="ltr">What&#39;s bad with printf() using gcc?<br>And you can choose any precision or even formatiing.<br><br><div class="gmail_quote">On Thu, May 20, 2010 at 2:55 PM, Nadav Har&#39;El <span dir="ltr">&lt;<a href="mailto:nyh@math.technion.ac.il">nyh@math.technion.ac.il</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">For years, I&#39;ve been wondering: How do other Unix or Linux users do simple<br>
calculations?<br>
<br>
Do you take out an actual physical calculator (which is of course ridiculous)?<br>
Do you use software that looks like a physical calculator (xcalc, kcalc, etc.)?<br>
<br>
Or do you use bc? Does anyone actually use bc, which returns &quot;0&quot; as a result<br>
for the calculation &quot;2/3&quot;? :-) Of course, you can use &quot;scale=10&quot; (or the -l<br>
option to bc) to fix that, but how many first-time users would know that?<br>
What posessed the person who decided to make scale=0 the default? :-)<br>
<br>
What I have been using myself, is my own version of Kernighan &amp; Pike&#39;s &quot;Hoc&quot;<br>
(see <a href="http://nadav.harel.org.il/homepage/hoc/" target="_blank">http://nadav.harel.org.il/homepage/hoc/</a>). But since this didn&#39;t catch on,<br>
as didn&#39;t the original Hoc (which was available in Research Unix and Plan 9,<br>
but not anywhere else), unfortunately I&#39;m one of the few who do. All of the<br>
rest are missing on the convenience of Hoc ;-)<br>
<br>
So I was wondering - how come there isn&#39;t more pressure on the Linux<br>
distributions to include a decent and convenient calculator language?<br>
Or do people consider what is available decent enough already?<br>
<br>
Nadav.<br>
<br>
--<br>
Nadav Har&#39;El                        |      Thursday, May 20 2010, 7 Sivan 5770<br>
<a href="mailto:nyh@math.technion.ac.il">nyh@math.technion.ac.il</a>             |-----------------------------------------<br>
Phone +972-523-790466, ICQ 13349191 |Despite the cost of living, have you<br>
<a href="http://nadav.harel.org.il" target="_blank">http://nadav.harel.org.il</a>           |noticed how it remains so popular?<br>
<br>
_______________________________________________<br>
Linux-il mailing list<br>
<a href="mailto:Linux-il@cs.huji.ac.il">Linux-il@cs.huji.ac.il</a><br>
<a href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il" target="_blank">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a><br>
</blockquote></div><br></div>