Fortran Coder

查看: 1714|回复: 3
打印 上一主题 下一主题

[通用算法] 运算中出现不解提示,求助01

[复制链接]

50

帖子

24

主题

0

精华

大师

F 币
1149 元
贡献
475 点
跳转到指定楼层
楼主
发表于 2022-10-28 16:47:57 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
运算中出现不解提示,求助01
***********************
[Fortran] 纯文本查看 复制代码
function r8_log_10 ( x )

!c*********************************************************************72
!c
!cc R8_LOG_10 returns the logarithm base 10 of an R8.
!c
!c  Discussion:
!c
!c    value = Log10 ( |X| )
!c
!c  Parameters:
!c
!c    Input, double precision X, the number whose base 2 logarithm is desired.
!c    X should not be 0.
!c
!c    Output, double precision R8_LOG_10, the logarithm base 10 of the absolute
!c    value of X.  It should be true that |X| = 10**R_LOG_10.
!c
      implicit none

      double precision r8_huge
      double precision r8_log_10
      double precision x

      if ( x .eq. 0.0D+00 ) then
#7492 |     r8_log_10 = - r8_huge ( x )
      else
        r8_log_10 = log10 ( abs ( x ) )
      end if

      return
      end
********************************
main.f90:7492:29: 7492 |         r8_log_10 = - r8_huge ( x )      |                             1Warning: More actual than formal arguments in procedure call at (1)/usr/bin/ld: /tmp/cc2NnkaB.o: in function `test07_':main.f90:(.text+0x1b015): undefined reference to `r8_uniform_'/usr/bin/ld: main.f90:(.text+0x1b04f): undefined reference to `r8_uniform_'/usr/bin/ld: /tmp/cc2NnkaB.o: in function `test03_':main.f90:(.text+0x1cddc): undefined reference to `r8_uniform_'/usr/bin/ld: /tmp/cc2NnkaB.o: in function `test02_':main.f90:(.text+0x1d745): undefined reference to `r8_uniform_'/usr/bin/ld: main.f90:(.text+0x1d765): undefined reference to `r8_uniform_'/usr/bin/ld: /tmp/cc2NnkaB.o:main.f90:(.text+0x1dcbc): more undefined references to `r8_uniform_' followcollect2: error: ld returned 1 exit status
#7492????
   不解。及下面内容的意思,求助!
谢谢!
分享到:  微信微信
收藏收藏 点赞点赞 点踩点踩

98

帖子

0

主题

0

精华

大师

F 币
658 元
贡献
293 点

规矩勋章元老勋章新人勋章

沙发
发表于 2022-10-28 17:22:48 | 只看该作者
你给出的部分代码无法判断这种"缺少函数"的问题。
天之道,损有余而补不足

213

帖子

2

主题

0

精华

宗师

F 币
2126 元
贡献
875 点

规矩勋章

板凳
发表于 2022-10-28 23:17:03 | 只看该作者
本帖最后由 风平老涡 于 2022-10-28 23:19 编辑

定义了r8_huge变量, 没有定义r8_huge(x) 函数。

50

帖子

24

主题

0

精华

大师

F 币
1149 元
贡献
475 点
地板
 楼主| 发表于 2022-11-2 14:03:05 | 只看该作者
收到, 谢谢!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 极速注册

本版积分规则

捐赠本站|Archiver|关于我们 About Us|小黑屋|Fcode ( 京ICP备18005632-2号 )

GMT+8, 2024-4-27 12:06

Powered by Tencent X3.4

© 2013-2024 Tencent

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