c ++ libstd同时计算sin和cos [英] c++ libstd compute sin and cos simultaneously
本文介绍了c ++ libstd同时计算sin和cos的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在c ++标准库中没有这样的函数吗?我找不到一个。
感谢
解决方案
在c ++标准库中没有这样的函数吗?
不,不幸的是没有。
在C库math.h中,有一个sincos函数
在Linux上,它可作为 GNU扩展。这在C中也不标准。
In C library math.h, there was a sincos function which was pretty efficient, because it computed both sine and cosine in a time closer to a single call to sin() or cos() than to the total time of calling both.
Is there no such function in c++ standard library? I cannot find one.
Thanks
解决方案
Is there no such function in c++ standard library?
No, unfortunately there isn't.
In C library math.h, there was a sincos function
On Linux, it is available as GNU Extension. It's not standard in C either.
这篇关于c ++ libstd同时计算sin和cos的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文