6 Comments
访客 *george zhang* @ 2008-12-25 07:53:07 写道:
这一天诞生了一个真理,足够了,哈哈
访客 *keke* @ 2008-12-26 20:25:02 写道:
谢博士这个试验挺有创意的 👍
访客 *Liang* @ 2010-05-10 10:45:06 写道:
My guess is that this difference may also be driven by the speed moving data around. In terms of pure computing speed, a large loop with x be a scalar sound more fair to sqrt() function. Just my $0.02
x system.time(for (i in 1:1e6){sqrt(x)})
用户 系统 流逝
1.00 0.00 1.05
system.time(for (i in 1:1e6){(x)^0.5})
用户 系统 流逝
1.45 0.00 1.50
system.time(for (i in 1:1e6){x^0.5})
用户 系统 流逝
1.14 0.00 1.15
That's a reasonable explanation. Thanks!
Originally posted on 2010-05-11 03:53:36
访客 *Jie* @ 2015-02-27 09:45:58 写道:
这个有比较2个函数的精确度吗?
Sign in to join the discussion
Sign in with GitHub