comparing python with c/fortran

后端 未结 8 1993
深忆病人
深忆病人 2021-02-04 10:15

I wrote the following programs to compare the speed of python with c/fortran. To get the time used by the programs I used the \"time\" command. All the programs compute the sq

8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-04 10:25

    for calculations i might try haskell or ml...

    try this code in ML:

    fun trip(x,y,z) = if y=z then 0
        else trip(((Math.sqrt((1.0*1.0)+(2.0*2.0)+(3.0*3.0)))*1.0),(y+1),z);
    trip(1.0,1,300000000);
    

提交回复
热议问题