OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
strr.F File Reference
#include "implicit_f.inc"
#include "chrasc_c.inc"

Go to the source code of this file.

Functions/Subroutines

character *8 function strr (y)

Function/Subroutine Documentation

◆ strr()

character*8 function strr ( y)

Definition at line 23 of file strr.F.

24C-----------------------------------------------
25C I m p l i c i t T y p e s
26C-----------------------------------------------
27#include "implicit_f.inc"
28C-----------------------------------------------
29C D u m m y A r g u m e n t s
30C-----------------------------------------------
31C REAL
33 . y
34C-----------------------------------------------
35C C o m m o n B l o c k s
36C-----------------------------------------------
37#include "chrasc_c.inc"
38C-----------------------------------------------
39C L o c a l V a r i a b l e s
40C-----------------------------------------------
41 INTEGER IEXP, ISE, ISM, MANT, MANT1, MANT2, MANT3, IS, MANT11,
42 . MANT12, MANT21, MANT22, MANT31, MANT32
43C REAL
45 . x, a, xman, big
46C-----------------------------------------------
47 x=y
48 big = zep999ep31
49 x=min(x,big)
50 x=max(x,-big)
51 a=abs(x)
52 IF(a<onep001em32)THEN
53 strr='10000000'
54 RETURN
55 ENDIF
56C
57 iexp=log10(a)
58 ise=max(0,-isign(1,iexp))
59 ism=sign(one,x)
60 ism=max(0,-ism)
61 xman =a*ten**(-iexp)
62 xman =xman*ep9
63 IF(xman>=ep9)THEN
64 xman=xman/ten
65 iexp=iexp+1
66 ENDIF
67 mant =xman
68 IF(mant>=1000000000)THEN
69 mant=mant/10
70 iexp=iexp+1
71 ENDIF
72 iexp=iabs(iexp)
73C
74 mant1=mant/1000000
75 mant=mant-1000000*mant1
76 mant2=mant/1000
77 mant3=mant-1000*mant2
78 is=2*ism+ise
79C
80 mant11=mant1/32
81 mant12=mant1-32*mant11
82 mant21=mant2/32
83 mant22=mant2-32*mant21
84 mant31=mant3/32
85 mant32=mant3-32*mant31
86C
87 strr(1:1)=codas(is+1)
88 strr(2:2)=codas(iexp)
89 strr(3:3)=codas(mant11)
90 strr(4:4)=codas(mant12)
91 strr(5:5)=codas(mant21)
92 strr(6:6)=codas(mant22)
93 strr(7:7)=codas(mant31)
94 strr(8:8)=codas(mant32)
95C
96 RETURN
#define my_real
Definition cppsort.cpp:32
character *8 function strr(y)
Definition strr.F:24
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21