找回密码
 注册
Simdroid-非首页
查看: 61|回复: 0

maple中 双阶乘函数--double facorial

[复制链接]
发表于 2007-3-23 19:27:03 | 显示全部楼层 |阅读模式 来自 江苏南京
在mathmatica中直接可以用!!表示双阶乘double facorial,而在maple中好像没有
编写一个,需要的可以,直接用


> ii:=proc(n) local i,a;iquo(n,2,'r'): if n=0 then a:=1; #把0!!定义成1,iquo函数是把n除以2的余给r
> elif r=0 then a:=1; for i from 0 to (n-2)/2 do
>      a:=a*(2*(i+1));od;
> else a:=1;for i from 0 to (n-1)/2 do
>      a:=a*(2*i+1);od;fi;
> end;




这样以后调用可以直接下面的方式。
> ii(2);
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-3-29 19:39 , Processed in 0.039150 second(s), 14 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表