OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
precision.c
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#include <stdio.h>
24#include <string.h>
25#include <stdlib.h>
26#include <math.h>
27
28#define _FCALL
29
30
31
32int _FCALL MY_SHIFTL(int *a, int *n)
33{ return *a << *n; }
34
35
36int my_shiftl(int *a, int *n)
37{ return *a << *n; }
38
39unsigned int my_shiftl_(int *a,int *n)
40{ return *a << *n; }
41
42int _FCALL MY_SHIFTR( int *a, int *n)
43{ return *a >> *n; }
44
45int my_shiftr(int *a,int *n)
46{ return *a >> *n; }
47
48int my_shiftr_(int *a, int *n)
49{ return *a >> *n; }
50
51int _FCALL MY_AND(int *a, int *b)
52{ return *a & *b; }
53
54int my_and(int *a,int *b)
55{ return *a & *b; }
56
57int my_and_(int *a, int *b)
58{ return *a & *b; }
59
60int _FCALL MY_OR(int *a, int *b)
61{ return *a | *b; }
62
63int my_or(int *a,int *b)
64{ return *a | *b; }
65
66int my_or_(int *a, int *b)
67{ return *a | *b; }
68
69/* routines calcul de la precision flotante minimum */
70
71void floatmin(int *a, int *b, float *flm)
72{
73 int l;
74 l = b-a;
75 if(l==4) *flm=1.2E-7 ;
76 else *flm=2.2E-16 ;
77}
78
79void floatmin_(int *a, int *b, float *flm)
80{
81 int l;
82 l = b-a;
83 if(l==4) *flm=1.2E-7 ;
84 else *flm=2.2E-16 ;
85}
86
87void _FCALL FLOATMIN(int *a, int *b, float *flm)
88{
89 int l;
90 l = b-a;
91 if(l==4) *flm=1.2E-7 ;
92 else *flm=2.2E-16 ;
93}
94
95void floatmin__(int *a, int *b, float *flm)
96{
97 int l;
98 l = b-a;
99 if(l==4) *flm=1.2E-7 ;
100 else *flm=2.2E-16 ;
101}
102
#define _FCALL
int _FCALL MY_SHIFTL(int *a, int *n)
Definition precision.c:32
void floatmin(int *a, int *b, float *flm)
Definition precision.c:71
int my_or_(int *a, int *b)
Definition precision.c:66
unsigned int my_shiftl_(int *a, int *n)
Definition precision.c:39
void _FCALL FLOATMIN(int *a, int *b, float *flm)
Definition precision.c:87
int my_shiftr(int *a, int *n)
Definition precision.c:45
int my_shiftl(int *a, int *n)
Definition precision.c:36
int _FCALL MY_SHIFTR(int *a, int *n)
Definition precision.c:42
int my_and_(int *a, int *b)
Definition precision.c:57
int my_or(int *a, int *b)
Definition precision.c:63
int _FCALL MY_AND(int *a, int *b)
Definition precision.c:51
int _FCALL MY_OR(int *a, int *b)
Definition precision.c:60
int my_and(int *a, int *b)
Definition precision.c:54
int my_shiftr_(int *a, int *n)
Definition precision.c:48
void floatmin__(int *a, int *b, float *flm)
Definition precision.c:95
void floatmin_(int *a, int *b, float *flm)
Definition precision.c:79
n