长双数学库的实现? [英] long double math library implementations?

查看:130
本文介绍了长双数学库的实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是C99的长双数学库函数可用便携式实现( EXPL 中海油 logl 等),如果有的话?我看着在fdlibm(基于星期日),NetBSD的(UCB为主)等来源和没有看到他们。

What are the available portable implementations of the C99 long double math library functions (expl, cosl, logl, etc.), if any? I've looked in fdlibm (Sun-based), NetBSD (UCB-based), etc. sources and not seen them.

推荐答案

您应该能够看到它在基于Sun的库(pretty使用太多所有打开的C库我所知道的,包括glibc的和FreeBSD之一)。

You should be able to see it in the Sun-based libraries (used in pretty much all the open C libraries I am aware of, including glibc and FreeBSD one).

我一般preFER BSD code 数学code(更可读IMO)。请参见这里 80位(英特尔)长的双格式。对于给定的功能,不同的实现/架构可能会在不同的目录。

I generally prefer BSD code for math code (more readable IMO). See here for 80-bits (Intel) long double format. For a given function, different implementation/architectures may be in different directories.

有一点需要明白的是,长双精度的不规范(更准确地说,只是自2008年转IEEE754,这是不是真的在最常见的CPU实现还)。这意味着每个CPU需要的东西很多(IA32,AMD64,PPC,阿尔法,Sparc的是在这方面各不相同......)。

One thing to realize is that long double is not standardized (more exactly, only since the 2008 rev of IEEE754, which is not really implemented in most common CPU yet). Which means each CPU requires a different implementation for a lot of stuff (IA32, AMD64, PPC, Alpha, Sparc are all different in that aspect...).

这篇关于长双数学库的实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆