Home Comments Thread
New Thread

6 Comments

giscus-bot giscus-bot 2022-12-16 15:56:09
访客 *cloud_wei* @ 2008-12-24 19:49:04 写道:

我也没有圣诞概念,此夜有实变函数陪伴 😁 ,感觉还是不错的。

@taiyun

giscus-bot giscus-bot 2022-12-16 15:56:10
访客 *lixiaoxu* @ 2008-12-24 23:53:41 写道:

x^.5肯定是取对数算的,没有求反函数的摸索过程

@lixiaoxu

giscus-bot giscus-bot 2022-12-16 15:56:11
访客 *george zhang* @ 2008-12-25 07:53:07 写道:

这一天诞生了一个真理,足够了,哈哈

giscus-bot giscus-bot 2022-12-16 15:56:12
访客 *keke* @ 2008-12-26 20:25:02 写道:

谢博士这个试验挺有创意的 👍

giscus-bot giscus-bot 2022-12-16 15:56:13
访客 *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

yihui yihui 2022-12-16 15:56:15

That's a reasonable explanation. Thanks!

Originally posted on 2010-05-11 03:53:36

giscus-bot giscus-bot 2022-12-16 15:56:14
访客 *Jie* @ 2015-02-27 09:45:58 写道:

这个有比较2个函数的精确度吗?

Sign in to join the discussion

Sign in with GitHub