由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Computation版 - <>全书下载
相关主题
Write In Chelp fortran read format
关于C和Fortran: 一点儿个人观点where to down a standard Fortran90 complier?
偶也问一fortran问题fortran problem
visual fortran区别6位以上的变量名吗?How to compile F77 file with C ?
problem about Fortran 77 in unixFortran77中
fortran搞计算还是简单多了a question about data transfer in MPI
请教Unix中怎么编译Fortun文件something strange in fortran90
关于adaptive grid size的问题How to read data written my MPI_WRITE?
相关话题的讨论汇总
话题: fortran话题: c++话题: lisp话题: symbolic话题: may
进入Computation版参与讨论
1 (共1页)
g***i
发帖数: 90
1
http://www-2.cs.cmu.edu/~dst/LispBook/index.html
Common Lisp: A Gentle Introduction to Symbolic Computation

David S. Touretzky
This book may be distributed in hardcopy form, for non-profit
educational purposes, provided that no fee is charged to the recipient
beyond photocopying costs. All other rights reserved. You may not
redistribute the Postscript file, e.g., you may not put a copy on another
web page, or include it on a CD-RO
s***s
发帖数: 38
2
真有人用lis计算么?
好奇的问一下.
另外,还有若干很好的scheme得书可以下载.
http://mitpress.mit.edu/sicp/sicp.html

【在 g***i 的大作中提到】
: http://www-2.cs.cmu.edu/~dst/LispBook/index.html
: Common Lisp: A Gentle Introduction to Symbolic Computation
:
: David S. Touretzky
: This book may be distributed in hardcopy form, for non-profit
: educational purposes, provided that no fee is charged to the recipient
: beyond photocopying costs. All other rights reserved. You may not
: redistribute the Postscript file, e.g., you may not put a copy on another
: web page, or include it on a CD-RO

s***s
发帖数: 38
3
我不会lisp,只会scheme,(lisp的一个变种)吧.
我很奇怪lisp到底在什么领域能有用?感觉那个东西非常的不实用化.
AI?
a**a
发帖数: 416
4
of course AI. And I think most mathematic symbolic program such as
maple, mathematica using lisp or lisp-like languages as their core
engine.

【在 s***s 的大作中提到】
: 我不会lisp,只会scheme,(lisp的一个变种)吧.
: 我很奇怪lisp到底在什么领域能有用?感觉那个东西非常的不实用化.
: AI?

s***s
发帖数: 38
5
Thanks for your explanation.
You mean that mathematica or maple use a lisp-like syntax? I never used them,
sorry.
But I think the difficulty of creating those math symbolic applications(e.g.
mathematica) lies in computational algebra, or computational ...(in some
sense, the clever algorithms to tackle math problems), not in lisp
symbolic processing at all.
I really know little on this, but it is very interesting to me.
I may work on this kinds of problems if have chance. :-)

【在 a**a 的大作中提到】
: of course AI. And I think most mathematic symbolic program such as
: maple, mathematica using lisp or lisp-like languages as their core
: engine.

a**a
发帖数: 416
6
no. I meant that those mathematic programs calculate symbols inside by
list-like semantics. Your arguments sound like this:
The FORTRAN numerical library's power does not lie in the language
feature provided by FORTRAN language, instead in the algorithms used
in the library to tackle math problems.
Is this making sense to you?

【在 s***s 的大作中提到】
: Thanks for your explanation.
: You mean that mathematica or maple use a lisp-like syntax? I never used them,
: sorry.
: But I think the difficulty of creating those math symbolic applications(e.g.
: mathematica) lies in computational algebra, or computational ...(in some
: sense, the clever algorithms to tackle math problems), not in lisp
: symbolic processing at all.
: I really know little on this, but it is very interesting to me.
: I may work on this kinds of problems if have chance. :-)

a**a
发帖数: 416
7
If the feature provided by FORTRAN is not so important, why didn't people
use LISP, which is as old as FORTRAN, to write numeric programs?

【在 s***s 的大作中提到】
: Thanks for your explanation.
: You mean that mathematica or maple use a lisp-like syntax? I never used them,
: sorry.
: But I think the difficulty of creating those math symbolic applications(e.g.
: mathematica) lies in computational algebra, or computational ...(in some
: sense, the clever algorithms to tackle math problems), not in lisp
: symbolic processing at all.
: I really know little on this, but it is very interesting to me.
: I may work on this kinds of problems if have chance. :-)

s***s
发帖数: 38
8
Yes, language does help.
But I can not see any major advantage of Fortran than a general-purpose
language (e.g. C)

【在 a**a 的大作中提到】
: If the feature provided by FORTRAN is not so important, why didn't people
: use LISP, which is as old as FORTRAN, to write numeric programs?

a**a
发帖数: 416
9
C is later than Fortran. In other words, Fortran has advantages of twenty
years. And there is some features in FORTRAN can help the compiler giving
more optimizations than ones in C.

【在 s***s 的大作中提到】
: Yes, language does help.
: But I can not see any major advantage of Fortran than a general-purpose
: language (e.g. C)

l*i
发帖数: 136
10
FORTRAN最大的好处是老头们手头有大堆他们年轻时候用FORTRAN写的
东西,他们不想也不能丢掉这些破烂程序而用别的语言再写一遍,反正
这些程序是经过了漫长时间的充分考证的,为什么不接着用下去呢?
所以学生只得接着用.

【在 a**a 的大作中提到】
: C is later than Fortran. In other words, Fortran has advantages of twenty
: years. And there is some features in FORTRAN can help the compiler giving
: more optimizations than ones in C.

相关主题
fortran搞计算还是简单多了help fortran read format
请教Unix中怎么编译Fortun文件where to down a standard Fortran90 complier?
关于adaptive grid size的问题fortran problem
进入Computation版参与讨论
a**a
发帖数: 416
11
That is partial true. The story of the other side is that FORTRAN does
setup a performance standard for numeric computation.

【在 l*i 的大作中提到】
: FORTRAN最大的好处是老头们手头有大堆他们年轻时候用FORTRAN写的
: 东西,他们不想也不能丢掉这些破烂程序而用别的语言再写一遍,反正
: 这些程序是经过了漫长时间的充分考证的,为什么不接着用下去呢?
: 所以学生只得接着用.

s***s
发帖数: 38
12
That is because:
1. no any other application driven for a general purpose languge,
since ealier applications of computer is mainly "computing".
2. Fortran compiler is easier to craft than C.
3. any others?
I agree with another guy's words. Fortran legacy codes are the only major
advantage of Fortran now.

【在 a**a 的大作中提到】
: C is later than Fortran. In other words, Fortran has advantages of twenty
: years. And there is some features in FORTRAN can help the compiler giving
: more optimizations than ones in C.

w*******g
发帖数: 99
13
From computational point of view, Fortran is faster than C and C++ ( from my
experience). With Fortran 90/95 you can also do OOP with Fortran and the
dynamic memory allocation is also overcome. You also can manipulate Array
more easily in Fortran and I think these are the reasons that Fortran can still
survive under the serious challenge posed by C/C++.

【在 s***s 的大作中提到】
: That is because:
: 1. no any other application driven for a general purpose languge,
: since ealier applications of computer is mainly "computing".
: 2. Fortran compiler is easier to craft than C.
: 3. any others?
: I agree with another guy's words. Fortran legacy codes are the only major
: advantage of Fortran now.

l*i
发帖数: 136
14
我听说,只是听说,因为我已经很久不用fortran作计算了,而且我老板的年龄刚好够他
喜欢用C,伊到现在都对C++敬而远之, 传说中fortran对C的这种速度优势已经基本
上不存在了. 因为有大堆程序员一刻不停地优化C的编译器,而对于fortran这种恐龙
已经没什么人感兴趣了. 所以fortran实际上并不快.
我认识的写fortran程序的人,多半都不关心速度,只要算出来就完事了,通常他们
也都有最好的,纯粹的计算设备. 优化C程序通常需要很多手艺活,而fortran,我的
经验是没有什么好去优化的. 所以一个fortran程序员写出来的C程序,很可能是
很粗糙的,如果更多精力用于优化的话,C的程序不见得比fortran慢. 当然,这只是我
随便瞎猜.

【在 w*******g 的大作中提到】
: From computational point of view, Fortran is faster than C and C++ ( from my
: experience). With Fortran 90/95 you can also do OOP with Fortran and the
: dynamic memory allocation is also overcome. You also can manipulate Array
: more easily in Fortran and I think these are the reasons that Fortran can still
: survive under the serious challenge posed by C/C++.

a**a
发帖数: 416
15
Of course not. There is some article giving insights why FORTRAN is faster
than C/C++, and why C/C++ compiler can't give the optimization offered by FORTRAN
compiler. There are also many benchmark tests approving that. What
you think is your matter, but don't argue it without solid evidence.

【在 l*i 的大作中提到】
: 我听说,只是听说,因为我已经很久不用fortran作计算了,而且我老板的年龄刚好够他
: 喜欢用C,伊到现在都对C++敬而远之, 传说中fortran对C的这种速度优势已经基本
: 上不存在了. 因为有大堆程序员一刻不停地优化C的编译器,而对于fortran这种恐龙
: 已经没什么人感兴趣了. 所以fortran实际上并不快.
: 我认识的写fortran程序的人,多半都不关心速度,只要算出来就完事了,通常他们
: 也都有最好的,纯粹的计算设备. 优化C程序通常需要很多手艺活,而fortran,我的
: 经验是没有什么好去优化的. 所以一个fortran程序员写出来的C程序,很可能是
: 很粗糙的,如果更多精力用于优化的话,C的程序不见得比fortran慢. 当然,这只是我
: 随便瞎猜.

l*i
发帖数: 136
16
您老能否举个把例子来作为"solid evidence"?
我大熟悉这行当,刚才找到一篇文章,不知道您老有啥评价.
url在这里:
http://osl.iu.edu/~tveldhui/papers/DrDobbs2/drdobbs2.html

【在 a**a 的大作中提到】
: Of course not. There is some article giving insights why FORTRAN is faster
: than C/C++, and why C/C++ compiler can't give the optimization offered by FORTRAN
: compiler. There are also many benchmark tests approving that. What
: you think is your matter, but don't argue it without solid evidence.

w*******g
发帖数: 99
17
This article gives only comparison between C++ and F77. From the comparison I
don't see that overall advantages that make C++ better than Fortran 77. The
author just said "C++ has cautht up with Fortran and is giving it stiff
competition". Still "no solid evidence" shows C++ is superior than its
counterpart. As I mentioned before, the comparison is just made for F77. With
the new development of F90/95 (soon F2000), Fortran has more powerful Array
manipulation capability and I think it will be a

【在 l*i 的大作中提到】
: 您老能否举个把例子来作为"solid evidence"?
: 我大熟悉这行当,刚才找到一篇文章,不知道您老有啥评价.
: url在这里:
: http://osl.iu.edu/~tveldhui/papers/DrDobbs2/drdobbs2.html

a**a
发帖数: 416
18
我随手找出一篇:
...
The main reason C++ has attracted the attention it has in the scientific
community is because Fortran 77 was a terribly outdated language. The many
weaknesses of Fortran 77 were solved with Fortran 90 however. Fortran 90 has
every feature in C that is important to scientific programming and most of
the features of an object oriented language (it lacks only inheritance and
that is likely going to be added in Fortran 2000). However unlike C and C++,
Fortran 90 is designed to generate
a**a
发帖数: 416
19
这篇文章的作者是Blitz++的作者. 这篇文章只是说经过使用template expression的
C++程序的速度可以和Fortran匹敌而已. 但是同样的算法, 用C实现的就是不如FORTRAN
的, 这是为什么呢? 我上面转的文章就指出了问题所在. 我不是鼓吹用FORTRAN. 事实
上我基本不用FORTRAN, 只用C/C++. 但是这不是盲目自大的理由. FORTRAN在数值计算
界的名声不是仅凭资格老的!

【在 l*i 的大作中提到】
: 您老能否举个把例子来作为"solid evidence"?
: 我大熟悉这行当,刚才找到一篇文章,不知道您老有啥评价.
: url在这里:
: http://osl.iu.edu/~tveldhui/papers/DrDobbs2/drdobbs2.html

s***s
发帖数: 38
20
I only know that so-called high performance fortran compiler is not
successful at all.
And I guess some "good" features fortran provide is "array" or "vector".
some old supercomputers have array or vector operations. So fortran may
use them in a very efficient way.
but now, "vector" supercomputers are gone, just like fortran.

pointer?

【在 a**a 的大作中提到】
: 这篇文章的作者是Blitz++的作者. 这篇文章只是说经过使用template expression的
: C++程序的速度可以和Fortran匹敌而已. 但是同样的算法, 用C实现的就是不如FORTRAN
: 的, 这是为什么呢? 我上面转的文章就指出了问题所在. 我不是鼓吹用FORTRAN. 事实
: 上我基本不用FORTRAN, 只用C/C++. 但是这不是盲目自大的理由. FORTRAN在数值计算
: 界的名声不是仅凭资格老的!

相关主题
How to compile F77 file with C ?something strange in fortran90
Fortran77中How to read data written my MPI_WRITE?
a question about data transfer in MPI如何在fortran中定义一个动态的数组?
进入Computation版参与讨论
a*******x
发帖数: 47
21
看了上面的贴子, 说说我的理解:
之所以FORTRAN比C/C++快, 一个重要的原因是FORTRAN标准规定子程序的参数之间不
允许有重叠的部分, 这样的话常常可疑保证计算结果于执行顺序无关, 从而使编译器
能够最大限度的优化:
比如以下的例子
SUBROUTINE ADD(N,A, B,C)
DIMENSION A(N),B(N),C(N)
DO I = 1, N
C(I) = A(I) +B(I)
ENDDO
END
由于A B C之间不允许有重叠,计算结果与执行顺序无关, 所以编译器可以进行
LOOP UNROLLING等优化.
而同样的C/C++程序, 如果不特别加上某些编译器开关的话, 就无法同样优化.因为
C允许参变量有重叠.

【在 s***s 的大作中提到】
: I only know that so-called high performance fortran compiler is not
: successful at all.
: And I guess some "good" features fortran provide is "array" or "vector".
: some old supercomputers have array or vector operations. So fortran may
: use them in a very efficient way.
: but now, "vector" supercomputers are gone, just like fortran.
:
: pointer?

l*i
发帖数: 136
22
arya前面贴的文章我也看过了,用google搜出来的第一篇文章就是它.呵呵
FORTRAN是专门用来作数值计算的,在这个领域里面它当然应该比C/C++有优势.
我只怀疑一点,一直说的FORTRAN程序比C程序快这种评论倒底有多少真实性.
不同的C程序员写出来的程序运行速度差别极大,而fortran程序员之间,我没
看到那么大的区别.当然这也说明在数值计算上fortran比C要成熟得多.

【在 a*******x 的大作中提到】
: 看了上面的贴子, 说说我的理解:
: 之所以FORTRAN比C/C++快, 一个重要的原因是FORTRAN标准规定子程序的参数之间不
: 允许有重叠的部分, 这样的话常常可疑保证计算结果于执行顺序无关, 从而使编译器
: 能够最大限度的优化:
: 比如以下的例子
: SUBROUTINE ADD(N,A, B,C)
: DIMENSION A(N),B(N),C(N)
: DO I = 1, N
: C(I) = A(I) +B(I)
: ENDDO

a**a
发帖数: 416
23
那就要请你多动动脑子了, 如果你不相信那么多数据的话. 你在internet上搜索
一下, 看看有几篇数据说的是FORTRAN比C快, 有几篇数据又是相反的呢? C语言
也发明30年了, 如果有solid的证据证明它能和FORTRAN一样快或者更快, 不会到
今天还见不到证据.

【在 l*i 的大作中提到】
: arya前面贴的文章我也看过了,用google搜出来的第一篇文章就是它.呵呵
: FORTRAN是专门用来作数值计算的,在这个领域里面它当然应该比C/C++有优势.
: 我只怀疑一点,一直说的FORTRAN程序比C程序快这种评论倒底有多少真实性.
: 不同的C程序员写出来的程序运行速度差别极大,而fortran程序员之间,我没
: 看到那么大的区别.当然这也说明在数值计算上fortran比C要成熟得多.

g***i
发帖数: 90
24
其实现在fortran也发展了很多版本。各有优势。还有,现在一些
大的软件包仍用的fortran, 如lapack

【在 a**a 的大作中提到】
: 那就要请你多动动脑子了, 如果你不相信那么多数据的话. 你在internet上搜索
: 一下, 看看有几篇数据说的是FORTRAN比C快, 有几篇数据又是相反的呢? C语言
: 也发明30年了, 如果有solid的证据证明它能和FORTRAN一样快或者更快, 不会到
: 今天还见不到证据.

g****d
发帖数: 64
25
I also believe Fortran is better in computation then C. Especially when
considering
the easiness of fortran programming.
Their is such a trend in commercial CFD package to use C++ instead of fortran.
That
might be due to the factor ,just like you guys said, 'C++' is faster than
Fortran.
An example is STARCD. Currently, it is coded by fortran. But talking a guy in
that
company, I was informed that they are now trying to use C++ to recode the
whole thing.
I might need to learn how to write C++ cod

【在 g***i 的大作中提到】
: 其实现在fortran也发展了很多版本。各有优势。还有,现在一些
: 大的软件包仍用的fortran, 如lapack

w*******g
发帖数: 99
26
C++ is a very powerful tool and I think it has great potential in scientific
computing. I really don't think the commercial code in CFD now is ready for
C++ because their operations are really based on commercialization. Somebody's
code can do OOP but yours cannot then you will lose market. Certainly, OOP is
a trend in the future and nobody wants lose it. I see a lot of development in
trying to incorporate C++ into CFD code and most companies are trying to do it.
If you know OOP and C++ it certa

【在 g****d 的大作中提到】
: I also believe Fortran is better in computation then C. Especially when
: considering
: the easiness of fortran programming.
: Their is such a trend in commercial CFD package to use C++ instead of fortran.
: That
: might be due to the factor ,just like you guys said, 'C++' is faster than
: Fortran.
: An example is STARCD. Currently, it is coded by fortran. But talking a guy in
: that
: company, I was informed that they are now trying to use C++ to recode the

d******e
发帖数: 2265
27
natrual language processing

【在 l*i 的大作中提到】
: arya前面贴的文章我也看过了,用google搜出来的第一篇文章就是它.呵呵
: FORTRAN是专门用来作数值计算的,在这个领域里面它当然应该比C/C++有优势.
: 我只怀疑一点,一直说的FORTRAN程序比C程序快这种评论倒底有多少真实性.
: 不同的C程序员写出来的程序运行速度差别极大,而fortran程序员之间,我没
: 看到那么大的区别.当然这也说明在数值计算上fortran比C要成熟得多.

1 (共1页)
进入Computation版参与讨论
相关主题
How to read data written my MPI_WRITE?problem about Fortran 77 in unix
如何在fortran中定义一个动态的数组?fortran搞计算还是简单多了
统计工作机会: Healthcare Economics Consultant --Cypress,CA请教Unix中怎么编译Fortun文件
激光陀螺的秘密程序编码泄露了关于adaptive grid size的问题
Write In Chelp fortran read format
关于C和Fortran: 一点儿个人观点where to down a standard Fortran90 complier?
偶也问一fortran问题fortran problem
visual fortran区别6位以上的变量名吗?How to compile F77 file with C ?
相关话题的讨论汇总
话题: fortran话题: c++话题: lisp话题: symbolic话题: may