[Aldor-l] is sal_sfloat.as buggy?

Christian Aistleitner tmgisi at gmx.at
Tue Sep 25 02:35:15 EDT 2007


Hello,

> [ various variants of importing powf ]

to me, it is not so important, how many or which functions work for now.  
It is more important to me, to hit the correct semantics of the code.

According to the manpage of powf on my machine, powf is a function taking  
two C floats and returning a C float.

Therefore, to meet the functions requirements, one has to import it in  
exactly that way, by using C float's equivalent Aldor type, which  
according to the AUG (Chapter 19.3; page 195) is SFlo.

Regardless of which of the various import statements work or do not work,  
regardless of which of the various import statements produce the correct  
width or incorrect width for their identifiers, only the import statement  
using SFlo meets the specification of the AUG and powf:

  import { powf: (SFlo, SFlo) -> SFlo } from Foreign C;

It might well be that other formulations work as well (like using Rep  
instead of SFlo) but these formulations do not model powf adequately.

Kind regards,
Christian



More information about the Aldor-l mailing list