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 33 of file strr.F.

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