public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* newlib and long-double question
@ 2011-04-09 21:07 Necro Cow
  2011-04-09 21:10 ` Christopher Faylor
  0 siblings, 1 reply; 15+ messages in thread
From: Necro Cow @ 2011-04-09 21:07 UTC (permalink / raw)
  To: cygwin

Hello.

I have recently discovered that the cygwin version I am using (1.7.7)
doesn't support many long-double function, like sqrtl, modfl, frexpl,
etc.

I have been reading on newlib's website, sourceware.org/newlib, that
as of version 1.18.0, such long-double functions are now supported.
(http://sourceware.org/ml/newlib/2009/msg01135.html)

What I can't seem to find out is, what version of newlib is in the
newest release of cygwin, and if it has this better support for
long-double functions.

One of the things I am trying to build with long-double support is
Perl-5-12.3, with use64bitint and uselongdouble options enabled (by
default they are not.) It requires functions such as sqrtl, modfl,
frexpl, which it seems are not available in the version of cygwin I am
using (1.7.7.)

Thanks for any help and insight.

-ncow

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: newlib and long-double question
  2011-04-09 21:07 newlib and long-double question Necro Cow
@ 2011-04-09 21:10 ` Christopher Faylor
  2011-04-09 22:04   ` marco atzeri
  0 siblings, 1 reply; 15+ messages in thread
From: Christopher Faylor @ 2011-04-09 21:10 UTC (permalink / raw)
  To: cygwin

On Sat, Apr 09, 2011 at 08:20:13AM -0700, Necro Cow wrote:
>Hello.
>
>I have recently discovered that the cygwin version I am using (1.7.7)
>doesn't support many long-double function, like sqrtl, modfl, frexpl,
>etc.
>
>I have been reading on newlib's website, sourceware.org/newlib, that
>as of version 1.18.0, such long-double functions are now supported.
>(http://sourceware.org/ml/newlib/2009/msg01135.html)
>
>What I can't seem to find out is, what version of newlib is in the
>newest release of cygwin, and if it has this better support for
>long-double functions.

Cygwin uses whatever is in the newlib tree as of its release date.  That
means that since Cygwin 1.7.7-1 was released in August 2010* it would
incorporate any newlib changes from 2009.  That doesn't mean that we would
export every single thing that newlib provides, however.  If functionality
is missing that means that no one has taken the time to get it working in
the Cygwin DLL.

cgf

*http://sourceware.org/ml/cygwin-announce/2010-08/msg00035.html

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: newlib and long-double question
  2011-04-09 21:10 ` Christopher Faylor
@ 2011-04-09 22:04   ` marco atzeri
  2011-04-10 10:25     ` N. C.
  0 siblings, 1 reply; 15+ messages in thread
From: marco atzeri @ 2011-04-09 22:04 UTC (permalink / raw)
  To: cygwin

On Sat, Apr 9, 2011 at 6:05 PM, Christopher Faylor  wrote:
> On Sat, Apr 09, 2011 at 08:20:13AM -0700, Necro Cow wrote:
>>Hello.
>>
>>I have recently discovered that the cygwin version I am using (1.7.7)
>>doesn't support many long-double function, like sqrtl, modfl, frexpl,
>>etc.
>>
>>I have been reading on newlib's website, sourceware.org/newlib, that
>>as of version 1.18.0, such long-double functions are now supported.
>>(http://sourceware.org/ml/newlib/2009/msg01135.html)

further the newlib announce says:
* long double math routines added for platforms where LDBL == DBL

so in reality you gain no additional performance on the double.

>>
>>What I can't seem to find out is, what version of newlib is in the
>>newest release of cygwin, and if it has this better support for
>>long-double functions.
>
> Cygwin uses whatever is in the newlib tree as of its release date.  That
> means that since Cygwin 1.7.7-1 was released in August 2010* it would
> incorporate any newlib changes from 2009.  That doesn't mean that we would
> export every single thing that newlib provides, however.  If functionality
> is missing that means that no one has taken the time to get it working in
> the Cygwin DLL.
>
> cgf
>
> *http://sourceware.org/ml/cygwin-announce/2010-08/msg00035.html
>

on 1.7.8 most of the missing "double" function were added
http://sourceware.org/ml/cygwin-announce/2011-03/msg00000.html

I thought to implement also the long double but as doubles are 64 bit
and long doubles are just 80 bits on windows, I found the effort not worth.

Marco

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: newlib and long-double question
  2011-04-09 22:04   ` marco atzeri
@ 2011-04-10 10:25     ` N. C.
  2011-04-10 11:28       ` marco atzeri
  2011-04-10 20:05       ` Reini Urban
  0 siblings, 2 replies; 15+ messages in thread
From: N. C. @ 2011-04-10 10:25 UTC (permalink / raw)
  To: cygwin

On 4/9/11, marco atzeri <marco.atzeri@gmail.com> wrote:
> On Sat, Apr 9, 2011 at 6:05 PM, Christopher Faylor  wrote:
>> On Sat, Apr 09, 2011 at 08:20:13AM -0700, Necro Cow wrote:
>>>Hello.
>>>
>>>I have recently discovered that the cygwin version I am using (1.7.7)
>>>doesn't support many long-double function, like sqrtl, modfl, frexpl,
>>>etc.
>>>
>>>I have been reading on newlib's website, sourceware.org/newlib, that
>>>as of version 1.18.0, such long-double functions are now supported.
>>>(http://sourceware.org/ml/newlib/2009/msg01135.html)
>
> further the newlib announce says:
> * long double math routines added for platforms where LDBL == DBL
>
> so in reality you gain no additional performance on the double.
>
>>>
>>>What I can't seem to find out is, what version of newlib is in the
>>>newest release of cygwin, and if it has this better support for
>>>long-double functions.
>>
>> Cygwin uses whatever is in the newlib tree as of its release date.  That
>> means that since Cygwin 1.7.7-1 was released in August 2010* it would
>> incorporate any newlib changes from 2009.  That doesn't mean that we would
>> export every single thing that newlib provides, however.  If functionality
>> is missing that means that no one has taken the time to get it working in
>> the Cygwin DLL.
>>
>> cgf
>>
>> *http://sourceware.org/ml/cygwin-announce/2010-08/msg00035.html
>>
>
> on 1.7.8 most of the missing "double" function were added
> http://sourceware.org/ml/cygwin-announce/2011-03/msg00000.html
>
> I thought to implement also the long double but as doubles are 64 bit
> and long doubles are just 80 bits on windows, I found the effort not worth.
>
> Marco

I have fully updated my cygwin tp 1.7.9(0.237/5/3) and I still get
this error when I try to build Perl (5.12.3 in this case but same with
other versions) with uselongdouble enabled in the Configure script,
which fails with:

*** You requested the use of long doubles but you do not seem to have
*** the following mathematical functions needed for long double support:
***     sqrtl modfl frexpl
*** Please rerun Configure without -Duselongdouble and/or -Dusemorebits.
*** Cannot continue, aborting.


On a Linux system that I have access to, I see that those functions
are in /lib/libm.* but cygwin's /lib/libm.* still seems to lack them.
Is there any work around or alternate version ofthis lib that actually
has these functions. I honestly do not mean to be rude, but how
difficult is it to impliment these functions which seem so common in
most unix-like systems? Or did nothing not get updated when I updated
cygwin?

Thanks,

M. C

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: newlib and long-double question
  2011-04-10 10:25     ` N. C.
@ 2011-04-10 11:28       ` marco atzeri
  2011-04-10 12:25         ` Sisyphus
  2011-04-10 20:05       ` Reini Urban
  1 sibling, 1 reply; 15+ messages in thread
From: marco atzeri @ 2011-04-10 11:28 UTC (permalink / raw)
  To: cygwin; +Cc: N. C.

On Sat, Apr 9, 2011 at 11:10 PM, N. C.  wrote:
> On 4/9/11, marco atzeri <xxxxxxxxxxxxxxxx> wrote:

don't quote email address. On this list is highly unpolite.

>>>>I have recently discovered that the cygwin version I am using (1.7.7)
>>>>doesn't support many long-double function, like sqrtl, modfl, frexpl,
>>>>etc.

As cgf mentioned they are not implemented "yet" in cygwin

>>>>
>>>>I have been reading on newlib's website, sourceware.org/newlib, that
>>>>as of version 1.18.0, such long-double functions are now supported.
>>>>(http://sourceware.org/ml/newlib/2009/msg01135.html)
>>
>> further the newlib announce says:
>> * long double math routines added for platforms where LDBL == DBL

on cygwin LDBL(80 bit) != DBL(64 bit)  so we have not such outcome

>>
>> so in reality you gain no additional performance on the double.
>>
>>>>
>>>>What I can't seem to find out is, what version of newlib is in the
>>>>newest release of cygwin, and if it has this better support for
>>>>long-double functions.
>>>
>>> Cygwin uses whatever is in the newlib tree as of its release date.  That
>>> means that since Cygwin 1.7.7-1 was released in August 2010* it would
>>> incorporate any newlib changes from 2009.  That doesn't mean that we would
>>> export every single thing that newlib provides, however.  If functionality
>>> is missing that means that no one has taken the time to get it working in
>>> the Cygwin DLL.
>>>
>>> cgf
>>>
>>> *http://sourceware.org/ml/cygwin-announce/2010-08/msg00035.html
>>>
>>
>> on 1.7.8 most of the missing "double" function were added
>> http://sourceware.org/ml/cygwin-announce/2011-03/msg00000.html
>>
>> I thought to implement also the long double but as doubles are 64 bit
>> and long doubles are just 80 bits on windows, I found the effort not worth.
>>
>> Marco
>
> I have fully updated my cygwin tp 1.7.9(0.237/5/3) and I still get
> this error when I try to build Perl (5.12.3 in this case but same with
> other versions) with uselongdouble enabled in the Configure script,
> which fails with:
>
> *** You requested the use of long doubles but you do not seem to have
> *** the following mathematical functions needed for long double support:
> ***     sqrtl modfl frexpl
> *** Please rerun Configure without -Duselongdouble and/or -Dusemorebits.
> *** Cannot continue, aborting.

The message is clear "Don' use long double".
Have you checked how the cygwin perl mantainer is doing the things ?

>
>
> On a Linux system that I have access to, I see that those functions
> are in /lib/libm.* but cygwin's /lib/libm.* still seems to lack them.
> Is there any work around or alternate version ofthis lib that actually
> has these functions. I honestly do not mean to be rude, but how
> difficult is it to impliment these functions which seem so common in
> most unix-like systems?

It is not overcomplicated to implement it, but it takes time and
someone to do it.
When I implemented all the complex functions (cabs, ccos..) I spent one month
to make it right. A more capable guy will take less surely, but as
mention I see little
benefit moving from 64 to 80 bits so I was not interested to implement it.

> Or did nothing not get updated when I updated
> cygwin?
>
> Thanks,
>
> M. C

Marco

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: newlib and long-double question
  2011-04-10 11:28       ` marco atzeri
@ 2011-04-10 12:25         ` Sisyphus
  2011-04-10 12:49           ` Hugh Myers
  0 siblings, 1 reply; 15+ messages in thread
From: Sisyphus @ 2011-04-10 12:25 UTC (permalink / raw)
  To: marco atzeri, cygwin; +Cc: N. C.


----- Original Message ----- 
From: "marco atzeri"

>> On a Linux system that I have access to, I see that those functions
>> are in /lib/libm.* but cygwin's /lib/libm.* still seems to lack them.
>> Is there any work around or alternate version ofthis lib that actually
>> has these functions. I honestly do not mean to be rude, but how
>> difficult is it to impliment these functions which seem so common in
>> most unix-like systems?
>
> It is not overcomplicated to implement it, but it takes time and
> someone to do it.
> When I implemented all the complex functions (cabs, ccos..) I spent one 
> month
> to make it right. A more capable guy will take less surely, but as
> mention I see little
> benefit moving from 64 to 80 bits so I was not interested to implement it.
>

I sense an opportunity here to plug (to the op) the Math::MPFR perl module - 
for which the gmp and mpfr C libraries are required.
I guess one could also use Math::BigFloat, but I assume the op has already 
considered (and rejected) that option - the performance hit incurred by its 
use has always discouraged me.
Perhaps he has also already considered and rejected Math::MPFR, but it seems 
to me to be by far the best option for achieving added precision with 
floating point numbers - at least until such time as building perl 
with -Duselongdouble has been facilitated.

Cheers,
Rob



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: newlib and long-double question
  2011-04-10 12:25         ` Sisyphus
@ 2011-04-10 12:49           ` Hugh Myers
  2011-04-10 13:33             ` Sisyphus
  2011-04-12  2:31             ` N. C.
  0 siblings, 2 replies; 15+ messages in thread
From: Hugh Myers @ 2011-04-10 12:49 UTC (permalink / raw)
  To: cygwin; +Cc: Sisyphus, marco atzeri, N. C.

The OP is trying to build Perl itself, not use it; hence the need for
long double support functions...

--hsm

On Sun, Apr 10, 2011 at 4:25 AM, Sisyphus <sisyphus1@optusnet.com.au> wrote:
>
> ----- Original Message ----- From: "marco atzeri"
>
>>> On a Linux system that I have access to, I see that those functions
>>> are in /lib/libm.* but cygwin's /lib/libm.* still seems to lack them.
>>> Is there any work around or alternate version ofthis lib that actually
>>> has these functions. I honestly do not mean to be rude, but how
>>> difficult is it to impliment these functions which seem so common in
>>> most unix-like systems?
>>
>> It is not overcomplicated to implement it, but it takes time and
>> someone to do it.
>> When I implemented all the complex functions (cabs, ccos..) I spent one
>> month
>> to make it right. A more capable guy will take less surely, but as
>> mention I see little
>> benefit moving from 64 to 80 bits so I was not interested to implement it.
>>
>
> I sense an opportunity here to plug (to the op) the Math::MPFR perl module -
> for which the gmp and mpfr C libraries are required.
> I guess one could also use Math::BigFloat, but I assume the op has already
> considered (and rejected) that option - the performance hit incurred by its
> use has always discouraged me.
> Perhaps he has also already considered and rejected Math::MPFR, but it seems
> to me to be by far the best option for achieving added precision with
> floating point numbers - at least until such time as building perl with
> -Duselongdouble has been facilitated.
>
> Cheers,
> Rob
>
>
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: newlib and long-double question
  2011-04-10 12:49           ` Hugh Myers
@ 2011-04-10 13:33             ` Sisyphus
  2011-04-10 15:33               ` Hugh Myers
  2011-04-10 18:48               ` Tim Prince
  2011-04-12  2:31             ` N. C.
  1 sibling, 2 replies; 15+ messages in thread
From: Sisyphus @ 2011-04-10 13:33 UTC (permalink / raw)
  To: Hugh Myers, cygwin; +Cc: marco atzeri, N. C.


----- Original Message ----- 
From: "Hugh Myers"

> The OP is trying to build Perl itself, not use it; hence the need for
> long double support functions...

You don't need "long double support functions" to build perl ... unless you 
want to build a perl whose NV is a long double (instead of a double).

Presumably the op wants to build a perl whose NV is a long double so that he 
can make use of that extra precision. Given that he can't build such a perl, 
the next best way of accessing that extra precision he wants is, imo, to use 
Math::MPFR.

Cheers,
Rob 


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: newlib and long-double question
  2011-04-10 13:33             ` Sisyphus
@ 2011-04-10 15:33               ` Hugh Myers
  2011-04-10 17:51                 ` Sisyphus
  2011-04-10 18:48               ` Tim Prince
  1 sibling, 1 reply; 15+ messages in thread
From: Hugh Myers @ 2011-04-10 15:33 UTC (permalink / raw)
  To: Sisyphus; +Cc: cygwin, marco atzeri, N. C.

Sisyphus, this is off topic slightly, but you might want to adjust the
link on the CPAN page:

 http://www.loria.fr/projets/mpfr/mpfr-current/mpfr.html

points to three lines of French whose meaning isn't all that clear. If
that is what you want then fine, but as I remember Loria does have an
English version for most of its projects--- perhaps you could link to
both?

--hsm

On Sun, Apr 10, 2011 at 5:28 AM, Sisyphus <sisyphus1@optusnet.com.au> wrote:
>
> ----- Original Message ----- From: "Hugh Myers"
>
>> The OP is trying to build Perl itself, not use it; hence the need for
>> long double support functions...
>
> You don't need "long double support functions" to build perl ... unless you
> want to build a perl whose NV is a long double (instead of a double).
>
> Presumably the op wants to build a perl whose NV is a long double so that he
> can make use of that extra precision. Given that he can't build such a perl,
> the next best way of accessing that extra precision he wants is, imo, to use
> Math::MPFR.
>
> Cheers,
> Rob
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: newlib and long-double question
  2011-04-10 15:33               ` Hugh Myers
@ 2011-04-10 17:51                 ` Sisyphus
  0 siblings, 0 replies; 15+ messages in thread
From: Sisyphus @ 2011-04-10 17:51 UTC (permalink / raw)
  To: Hugh Myers; +Cc: cygwin, N. C.


----- Original Message ----- 
From: "Hugh Myers"

> Sisyphus, this is off topic slightly, but you might want to adjust the
> link on the CPAN page:
>
> http://www.loria.fr/projets/mpfr/mpfr-current/mpfr.html

Yes - thanks. (And it *is* OT :-)
That's an old link that I'd overlooked. I can probably just delete it 
entirely.
The http://www.mpfr.org link in the preceding (DEPENDENCIES) section is the 
appropriate starting place for everything one needs wrt the mpfr library.

Cheers,
Rob 


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: newlib and long-double question
  2011-04-10 13:33             ` Sisyphus
  2011-04-10 15:33               ` Hugh Myers
@ 2011-04-10 18:48               ` Tim Prince
  2011-04-11 17:45                 ` N. C.
  1 sibling, 1 reply; 15+ messages in thread
From: Tim Prince @ 2011-04-10 18:48 UTC (permalink / raw)
  To: cygwin

On 4/10/2011 4:28 AM, Sisyphus wrote:
>
> ----- Original Message ----- From: "Hugh Myers"
>
>> The OP is trying to build Perl itself, not use it; hence the need for
>> long double support functions...
>
> You don't need "long double support functions" to build perl ... unless
> you want to build a perl whose NV is a long double (instead of a double).
>
> Presumably the op wants to build a perl whose NV is a long double so
> that he can make use of that extra precision. Given that he can't build
> such a perl, the next best way of accessing that extra precision he
> wants is, imo, to use Math::MPFR.
>
I never did see a clear description of OP's goals.  "Performance" was 
among them, so it was unclear why typical mathlinline.h content would 
have been rejected e.g.

__inline_mathcode_ (long double, __sqrtl, __x, return __builtin_sqrtl (__x))


As OP indicated, the functions might not have been difficult to write, 
perhaps not as difficult as settling requirements. If the requirement 
was for sqrtl to perform faster than sqrt, the expectation was misguided.


-- 
Tim Prince

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: newlib and long-double question
  2011-04-10 10:25     ` N. C.
  2011-04-10 11:28       ` marco atzeri
@ 2011-04-10 20:05       ` Reini Urban
  1 sibling, 0 replies; 15+ messages in thread
From: Reini Urban @ 2011-04-10 20:05 UTC (permalink / raw)
  To: cygwin; +Cc: N. C.

2011/4/9 N. C.:
> On 4/9/11, marco atzeri wrote:
>> On Sat, Apr 9, 2011 at 6:05 PM, Christopher Faylor  wrote:
>>> On Sat, Apr 09, 2011 at 08:20:13AM -0700, Necro Cow wrote:
>>>>I have recently discovered that the cygwin version I am using (1.7.7)
>>>>doesn't support many long-double function, like sqrtl, modfl, frexpl,
>>>>etc.
>>>>
>>>>I have been reading on newlib's website, sourceware.org/newlib, that
>>>>as of version 1.18.0, such long-double functions are now supported.
>>>>(http://sourceware.org/ml/newlib/2009/msg01135.html)
>>
>> further the newlib announce says:
>> * long double math routines added for platforms where LDBL == DBL
>>
>> so in reality you gain no additional performance on the double.
>>>>What I can't seem to find out is, what version of newlib is in the
>>>>newest release of cygwin, and if it has this better support for
>>>>long-double functions.
>>>
>>> Cygwin uses whatever is in the newlib tree as of its release date.  That
>>> means that since Cygwin 1.7.7-1 was released in August 2010* it would
>>> incorporate any newlib changes from 2009.  That doesn't mean that we would
>>> export every single thing that newlib provides, however.  If functionality
>>> is missing that means that no one has taken the time to get it working in
>>> the Cygwin DLL.
>>>
>>> cgf
>>>
>>> *http://sourceware.org/ml/cygwin-announce/2010-08/msg00035.html
>>>
>>
>> on 1.7.8 most of the missing "double" function were added
>> http://sourceware.org/ml/cygwin-announce/2011-03/msg00000.html
>>
>> I thought to implement also the long double but as doubles are 64 bit
>> and long doubles are just 80 bits on windows, I found the effort not worth.
>>
>> Marco
>
> I have fully updated my cygwin tp 1.7.9(0.237/5/3) and I still get
> this error when I try to build Perl (5.12.3 in this case but same with
> other versions) with uselongdouble enabled in the Configure script,
> which fails with:
>
> *** You requested the use of long doubles but you do not seem to have
> *** the following mathematical functions needed for long double support:
> ***     sqrtl modfl frexpl
> *** Please rerun Configure without -Duselongdouble and/or -Dusemorebits.
> *** Cannot continue, aborting.

I started to implement those three missing functions some time ago for perl
but got stuck somewhere.
I posted sqrtl to the newlib list.

Maybe I'll make for it for the upcoming perl-5.14.0 release but my
time is limited.
-- 
Reini Urban
http://phpwiki.org/           http://murbreak.at/

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: newlib and long-double question
  2011-04-10 18:48               ` Tim Prince
@ 2011-04-11 17:45                 ` N. C.
  0 siblings, 0 replies; 15+ messages in thread
From: N. C. @ 2011-04-11 17:45 UTC (permalink / raw)
  To: cygwin

On 4/10/11, Tim Prince wrote:
> On 4/10/2011 4:28 AM, Sisyphus wrote:
>>
>> ----- Original Message ----- From: "Hugh Myers"
>>
>>> The OP is trying to build Perl itself, not use it; hence the need for
>>> long double support functions...
>>
>> You don't need "long double support functions" to build perl ... unless
>> you want to build a perl whose NV is a long double (instead of a double).
>>
>> Presumably the op wants to build a perl whose NV is a long double so
>> that he can make use of that extra precision. Given that he can't build
>> such a perl, the next best way of accessing that extra precision he
>> wants is, imo, to use Math::MPFR.
>>
> I never did see a clear description of OP's goals.  "Performance" was
> among them, so it was unclear why typical mathlinline.h content would
> have been rejected e.g.
>
> __inline_mathcode_ (long double, __sqrtl, __x, return __builtin_sqrtl (__x))
>
>
> As OP indicated, the functions might not have been difficult to write,
> perhaps not as difficult as settling requirements. If the requirement
> was for sqrtl to perform faster than sqrt, the expectation was misguided.

What I wanted was merely to be able to build Perl with both the
'use64bitint' option (which appears to work), as well as the
'uselongdouble', which fails to the lack of those functions being
defined.

With Perl, I really prefer to get as close to a genuine build as
possible so as to avoid any unforeseen issues, but if you have a
suggestion to allow Perl to build with those options, I'm all ears to
hear it. That said, I still think it's overall more benefictial to
actually have those functions implimented in the spected place, within
the c library (usually in libm.)


Thank you.

N. C.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: newlib and long-double question
  2011-04-10 12:49           ` Hugh Myers
  2011-04-10 13:33             ` Sisyphus
@ 2011-04-12  2:31             ` N. C.
  2011-04-18 11:43               ` Corinna Vinschen
  1 sibling, 1 reply; 15+ messages in thread
From: N. C. @ 2011-04-12  2:31 UTC (permalink / raw)
  To: cygwin

Exactly, I really need to be able to build Perl whose NV is a long
double. And this was just one example that I gave. I honestly think it
is worth it to have long double support in cygwin (to have those
functions that are currently undefined), as it seems more and more
clear that A) there is a use for them, and B) there are cases where it
really is needed.

IIRC, the whole point of cygwin is to have a unix-like environment
within a non-unix-like system, right? Does it not make sense to make
the back bone (libc) that much mroe complete, furthur augmenting
usability and compatibility?

Again, thanks to all of you for your time and input.

- N.C.

On 4/10/11, Hugh Myers wrote:
> The OP is trying to build Perl itself, not use it; hence the need for
> long double support functions...
>
> --hsm
>
> On Sun, Apr 10, 2011 at 4:25 AM, Sisyphus <sisyphus1@optusnet.com.au> wrote:
>>
>> ----- Original Message ----- From: "marco atzeri"
>>
>>>> On a Linux system that I have access to, I see that those functions
>>>> are in /lib/libm.* but cygwin's /lib/libm.* still seems to lack them.
>>>> Is there any work around or alternate version ofthis lib that actually
>>>> has these functions. I honestly do not mean to be rude, but how
>>>> difficult is it to impliment these functions which seem so common in
>>>> most unix-like systems?
>>>
>>> It is not overcomplicated to implement it, but it takes time and
>>> someone to do it.
>>> When I implemented all the complex functions (cabs, ccos..) I spent one
>>> month
>>> to make it right. A more capable guy will take less surely, but as
>>> mention I see little
>>> benefit moving from 64 to 80 bits so I was not interested to implement
>>> it.
>>>
>>
>> I sense an opportunity here to plug (to the op) the Math::MPFR perl module
>> -
>> for which the gmp and mpfr C libraries are required.
>> I guess one could also use Math::BigFloat, but I assume the op has already
>> considered (and rejected) that option - the performance hit incurred by
>> its
>> use has always discouraged me.
>> Perhaps he has also already considered and rejected Math::MPFR, but it
>> seems
>> to me to be by far the best option for achieving added precision with
>> floating point numbers - at least until such time as building perl with
>> -Duselongdouble has been facilitated.
>>
>> Cheers,
>> Rob
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: newlib and long-double question
  2011-04-12  2:31             ` N. C.
@ 2011-04-18 11:43               ` Corinna Vinschen
  0 siblings, 0 replies; 15+ messages in thread
From: Corinna Vinschen @ 2011-04-18 11:43 UTC (permalink / raw)
  To: cygwin

On Apr 10 19:30, N. C. wrote:
> Exactly, I really need to be able to build Perl whose NV is a long
> double. And this was just one example that I gave. I honestly think it
> is worth it to have long double support in cygwin (to have those
> functions that are currently undefined), as it seems more and more
> clear that A) there is a use for them, and B) there are cases where it
> really is needed.
> 
> IIRC, the whole point of cygwin is to have a unix-like environment
> within a non-unix-like system, right? Does it not make sense to make
> the back bone (libc) that much mroe complete, furthur augmenting
> usability and compatibility?

The problem is not that anybody doubts that long double support is
useful, the problem is the simple lack of somebody actually volunteering
to do it.  We all have our plates full with other stuff to do.

So, if you're familiar with math stuff and you would like to see long
double support in newlib/Cygwin, there's nothing better than
contributing the code yourself.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-04-18 10:17 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-09 21:07 newlib and long-double question Necro Cow
2011-04-09 21:10 ` Christopher Faylor
2011-04-09 22:04   ` marco atzeri
2011-04-10 10:25     ` N. C.
2011-04-10 11:28       ` marco atzeri
2011-04-10 12:25         ` Sisyphus
2011-04-10 12:49           ` Hugh Myers
2011-04-10 13:33             ` Sisyphus
2011-04-10 15:33               ` Hugh Myers
2011-04-10 17:51                 ` Sisyphus
2011-04-10 18:48               ` Tim Prince
2011-04-11 17:45                 ` N. C.
2011-04-12  2:31             ` N. C.
2011-04-18 11:43               ` Corinna Vinschen
2011-04-10 20:05       ` Reini Urban

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).