由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - logarithm and product, which is faster?
相关主题
一个小问题*** help needed! on MATLAB GUI ***
急问高手一个问题:How to tell gcc stop compiling.
Which C++ compiler do you use on your home computer?inheritence problem
Forward declaration with unique_ptrA tech question (转载)
C arrayAn interesting C++ compile error
pointer overflow谁来解释一下这个是compiler问题吗?
A C++ compiler related interview question关于Makefile的一个问题
a question about bitwise operation这句话是为什么呢?
相关话题的讨论汇总
话题: log话题: faster话题: logarithm话题: product话题: code
进入Programming版参与讨论
1 (共1页)
t*d
发帖数: 1290
1
a = log(b*c*d*e*f)
AND
a = log(a) + log(b) + log(c) + log(f)
Which code is faster?
Thx!
a**a
发帖数: 416
2
The former is faster, but the other is more stable from overflow.

【在 t*d 的大作中提到】
: a = log(b*c*d*e*f)
: AND
: a = log(a) + log(b) + log(c) + log(f)
: Which code is faster?
: Thx!

a******e
发帖数: 95
3
Modern compilers will consider them the same.

【在 t*d 的大作中提到】
: a = log(b*c*d*e*f)
: AND
: a = log(a) + log(b) + log(c) + log(f)
: Which code is faster?
: Thx!

1 (共1页)
进入Programming版参与讨论
相关主题
这句话是为什么呢?C array
spent a lot of time try to compile boostpointer overflow
一个qt3在Windows上的问题A C++ compiler related interview question
ambiguous operators in c++a question about bitwise operation
一个小问题*** help needed! on MATLAB GUI ***
急问高手一个问题:How to tell gcc stop compiling.
Which C++ compiler do you use on your home computer?inheritence problem
Forward declaration with unique_ptrA tech question (转载)
相关话题的讨论汇总
话题: log话题: faster话题: logarithm话题: product话题: code