I am not getting any warnings for <br>
 &nbsp; &nbsp; &nbsp;&nbsp; (a:%) ^ (b:%):% == {<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;import { powf: (%, %) -&gt; % } from Foreign C;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;powf(a, b);<br>
 &nbsp; &nbsp; &nbsp; &nbsp;}<br>or<br><span class="q">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (a:%) ^ (b:%):% == {<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; import { powf: (Rep, Rep) -&gt; Rep } from Foreign C;<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; per powf(rep a, rep b);<br>&nbsp;&nbsp; &nbsp; &nbsp; }<br>Imho, they are both correct, though have a potential for an 
<br>error: if we decide to change the representation, e.g. box the <br>SFlo, the Aldor compiler won&#39;t notice the type mismatch<br>in the import. <br>To prevent this potential problem, one could write<br></span><span class="q">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (a:%) ^ (b:%):% == {<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; import { powf: (SFlo, SFlo) -&gt; SFlo } from Foreign C;<br>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; coerce powf(coerce a, coerce b);<br>&nbsp;&nbsp; &nbsp; &nbsp; }</span><br><span class="q"><br></span>
<br>
This one<br><div style="direction: ltr;"><span class="q"> &nbsp; &nbsp; &nbsp; &nbsp;(a:%) ^ (b:%):% == {<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;import { powf: (%, %) -&gt; % } from Foreign C;<br></span></div><div style="direction: ltr;"><span class="q"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;per powf(rep a, rep b);
<br> &nbsp; &nbsp; &nbsp; &nbsp;}<br></span></div>however does produce a type mismatch error:<br>&quot;/data/oleg/aldor_tree/aldor/install/aldor/linux/1.1.0/include/aldor.as&quot;, line 22: <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rep x == ((x)@%) pretend Rep;<br>.........................^
<br>[L22 C26] #2 (Error) (After Macro Expansion) Argument 1 of `powf&#39; did not match any possible parameter type.<br>&nbsp;&nbsp;&nbsp; The rejected type is Rep.<br>&nbsp;&nbsp;&nbsp; Expected type %.<br>Expanded expression was: a @ % pretend Rep<br>
<br>Oleg<br><br>
<br><div><span class="gmail_quote">2007/9/24, Stephen Watt &lt;<a href="mailto:watt@scl.csd.uwo.ca" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">watt@scl.csd.uwo.ca</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

David, what warnings are you getting?<br><br>All three versions should give the right widths for the values.<br><br>We want to be careful about the pretends implied by the rep operators<br>because we dont want any unsigned-&gt;float conversions to take place.
<br>We just ant a re-interpretation cast in the generated C.<br><br>If the import statement reads&nbsp;&nbsp;... from Foreign C(&quot;math.h&quot;)&nbsp;&nbsp;then that<br>should generate a #include &lt;math.h&gt; rather than a prototype.<br>

<br>-- Stephen<br><br><br>On Mon, Sep 24, 2007 at 10:48:23AM +0200, Ralf Hemmecke wrote:<br>&gt; Hi David,<br>&gt;<br>&gt; Looks like a bug to me. But it should rather read...<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (a:%) ^ (b:%):% == {<br>

&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
import { powf: (%, %) -&gt; % } from Foreign C;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; per powf(rep a, rep b);<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt;<br>&gt; Would someone disagree?<br>&gt;<br>&gt; Ralf<br>&gt;<br>&gt;<br>&gt;<br>&gt; On 09/24/2007 05:24 AM, David Casperson wrote:
<br>&gt; &gt; sal_sfloat.as in lib/aldor/src/arith/ contains the lines<br>&gt; &gt;<br>&gt; &gt; ----------------------------------------------------------------------<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rep == SFlo;<br>&gt; &gt;<br>&gt; &gt; -- ...
<br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; (a:%) ^ (b:%):% == {<br>&gt;
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
import { powf: (%, %) -&gt; % } from Foreign C;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; powf(a, b);<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt; &gt; ----------------------------------------------------------------------<br>&gt; &gt;<br>&gt; &gt; am I hallucinating or shouldn&#39;t this be?
<br>&gt; &gt;<br>&gt; &gt; ----------------------------------------------------------------------<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Rep == SFlo;<br>&gt; &gt;<br>&gt; &gt; -- ...<br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; (a:%) ^ (b:%):% == {<br>&gt;
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
import { powf: (Rep, Rep) -&gt; Rep } from Foreign C;<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; per powf(rep a, rep b);<br>&gt; &gt;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&gt; &gt; ----------------------------------------------------------------------<br>&gt; &gt;<br>

&gt; &gt; The current version gives warning messages about type mismatches.<br>&gt;<br>&gt; _______________________________________________<br>&gt; Aldor-l mailing list<br>&gt; <a href="mailto:Aldor-l@aldor.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Aldor-l@aldor.org
</a><br>&gt; <a href="http://aldor.org/mailman/listinfo/aldor-l_aldor.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://aldor.org/mailman/listinfo/aldor-l_aldor.org</a><br><br>_______________________________________________
<br>Aldor-l mailing list<br><a href="mailto:Aldor-l@aldor.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
Aldor-l@aldor.org</a><br><a href="http://aldor.org/mailman/listinfo/aldor-l_aldor.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://aldor.org/mailman/listinfo/aldor-l_aldor.org</a><br></blockquote>
</div><br>