OpenRadioss
2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
strr.F
Go to the documentation of this file.
1
Copyright> OpenRadioss
2
Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3
Copyright>
4
Copyright> This program is free software: you can redistribute it and/or modify
5
Copyright> it under the terms of the GNU Affero General Public License as published by
6
Copyright> the Free Software Foundation, either version 3 of the License, or
7
Copyright> (at your option) any later version.
8
Copyright>
9
Copyright> This program is distributed in the hope that it will be useful,
10
Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11
Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
Copyright> GNU Affero General Public License for more details.
13
Copyright>
14
Copyright> You should have received a copy of the GNU Affero General Public License
15
Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16
Copyright>
17
Copyright>
18
Copyright> Commercial Alternative: Altair Radioss Software
19
Copyright>
20
Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21
Copyright> software under a commercial license. Contact Altair to discuss further if the
22
Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23
C=======================================================================
24
C
25
C UNIV.FOR
26
C
27
C=======================================================================
28
C-------------------------------------------
29
C
30
C ROUTINES DE CODAGE ET DECODAGE
31
C
32
C-------------------------------------------
33
CHARACTER*8
FUNCTION
strr
(Y)
34
C-----------------------------------------------
35
C I m p l i c i t T y p e s
36
C-----------------------------------------------
37
#include "implicit_f.inc"
38
C-----------------------------------------------
39
C D u m m y A r g u m e n t s
40
C-----------------------------------------------
41
C REAL
42
my_real
43
. y
44
C-----------------------------------------------
45
C C o m m o n B l o c k s
46
C-----------------------------------------------
47
#include
"chrasc_c.inc"
48
C-----------------------------------------------
49
C L o c a l V a r i a b l e s
50
C-----------------------------------------------
51
INTEGER
IEXP
, ise, ism, mant, mant1, mant2, mant3,
IS
, mant11,
52
. mant12, mant21, mant22, mant31, mant32
53
C REAL
54
my_real
55
. x, a, xman, p99
56
C
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
66
C
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)
83
C
84
mant1=mant/1000000
85
mant=mant-1000000*mant1
86
mant2=mant/1000
87
mant3=mant-1000*mant2
88
is=2*ism+ise
89
C
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
96
C
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)
105
C
106
RETURN
107
END
my_real
#define my_real
Definition
cppsort.cpp:32
min
#define min(a, b)
Definition
macros.h:20
max
#define max(a, b)
Definition
macros.h:21
strr
character *8 function strr(y)
Definition
strr.F:34
starter
source
tools
univ
strr.F
Generated by
1.15.0