subroutine ugly_()
common /vvodimie/a,b,ugol
common /pii/pi
common/ugly/ugol1,ugol2,ugol3,ugol4,ugol5
p=a*sin(ugol1)/b
ugol2=asin(p)
ugol3=pi-ugol2-ugol1
if(a.gt.b)then
ugol4=pi-ugol2
ugol5=pi-ugol1-ugol4
endif
end
!!min ugol!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
subroutine min_ugol(ugol_1,ugol_2,ugol_3,c_min)
if(ugol_1.lt.ugol_2)then
if(ugol_1.lt.ugol_3)then
c_min=ugol_1
else
c_min=ugol_3
endif
else
if(ugol_2.lt.ugol_3)then
c_min=ugol_2
else
c_min=ugol_3
endif
endif
end
!!cos_min!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
subroutine cos_min_ugol(ugol_1,ugol_2,ugol_3,xx)
call min_ugol(ugol_1,ugol_2,ugol_3,c_min)
xx=cos(c_min)
end
!!proverka na korrektnost dannyx!!!!!!!!!!!!!!!!!!!!!!
subroutine proverka1(n,k)
common /vvodimie/a,b,ugol
common/pii/pi
n=1
k=1
if (a.lt.0 .or. b.lt.0 .or. ugol.lt.0 .or. !proveryem chto storony >0 i 0<ugol<180
*ugol.gt.180.0 .or. a.gt.1E+019 .or. b.gt.1E+019.or.
*a.lt.1E-022 .or. b.lt.1E-022) then
n=0
endif
if (a.ge.b.and.ugol.ge.90.0)then!proveryem na E treygol'nika
k=0
endif
end
!!proverka na E treygolnika!!!!!!!!!!!!!!!!!!!!!!!!!!
subroutine proverka2(ji)
common /vvodimie/a,b,ugol
common /pii/pi
common/ugly/ugol1,ugol2,ugol3,ugol4,ugol5
r=a*sin(ugol)
if (r.gt.b)then!proveryem na E treygol'nika ishody iz teoremy sin
ji=0
print*, 'necorrectnie dannie'
pause
stop
endif
end
!!ploshad'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
subroutine square1(ugol11,s)
common /vvodimie/a,b,ugol
s=a*b*sin(ugol11)/2
end
№ |
a |
b |
ugol |
square |
Min_ugol |
cos min ugol |
комментарий |
1 |
-1 |
3 |
45 |
necorrectnie dannie |
нет |
||
2 |
8 |
3 |
30 |
necorrectnie dannie |
b<a asin>b |
||
3 |
10 |
5 |
30 |
21.6506348 |
30.0000000 |
0.8660254 |
Прямоугольный |
4 |
1 |
1 |
65 |
0.3830222 |
50.0000038 |
0.6427876 |
Равнобедренный |
5 |
20 |
30 |
45 |
287,0828552 |
28,1255054 |
0,8819171 |
Произвольный |
6 |
5 |
3 |
30 |
7.4855494 3.3397696 |
26.4427013 30.0000000 |
0.8660254 0.8953801 |
2 треугольника |
7 |
1 |
1 |
60 |
0,4330127 |
60.0000000 |
0.5000000 |
Равносторонний |
8 |
5 |
3 |
150 |
necorrectnie dannie |
a>b, ugol>90 |
Тесты
Протокол исследований:
1 исследование
a |
b |
α |
S |
1E+001 |
1E+001 |
60 |
43.3012695 |
1E+005 |
1E+005 |
4.3301268E+009 |
|
1E+019 |
1E+019 |
4.33011271E+037 |
|
1E+020 |
1E+020 |
Inf |
a |
b |
α |
S |
1E-003 |
1E-003 |
60 |
4.3301276E-007 |
1E-020 |
1E-020 |
4.3301524E-041 |
|
1E-022 |
1E-022 |
4.2038954E-045 |
|
1E-023 |
1E-023 |
0.0000000 |
2 исследование
a |
b |
α |
S |
Cos min angle |
1E+008 |
1E+008 |
1 |
1.7449726E+014 |
0.9998477 |
0.1 |
1.7452959E+013 |
0.9999985 |
||
0.01 |
1.7447868E+012 |
1.0000000 |
||
1E-003 |
1.7360845E+011 |
1.0000000 |
||
1E-006 |
-4.3711389E+008 |
1.0000000 |
||
1E+012 |
1E+012 |
1 |
1.7449725E+022 |
0.9998477 |
0.1 |
1.7452960E+021 |
0.9999985 |
||
0.01 |
1.7447869E+020 |
1.0000000 |
||
1E-005 |
7.5497897E+016 |
1.0000000 |
||
1E-006 |
-4.371139E+016 |
1.0000000 |
||
1E+015 |
1E+015 |
1 |
1.7449725E+028 |
0.9998477 |
0.1 |
1.7452959E+027 |
0.9999985 |
||
0.001 |
1.7447868E+026 |
1.0000000 |
||
1E-005 |
7.5497898E+022 |
1.0000000 |
||
1E-006 |
-4.3711389E+022 |
1.0000000 |
3 исследование ()
s |
min angle |
cos min angle |
|
3.14 |
287.1682129 |
28.1275692 |
0.8820174 |
3.14159 |
287,0830078 |
28.1255093 |
0.8819172 |
3.1415926 |
287.0828857 |
28.1255054 |
0.8819171 |
3.14159265 |
287.0828552 |
28.1255054 |
0.8819171 |
3.1415926535 |
287.0828552 |
28.1255054 |
0.8819171 |
3.1415927 |
287.0828552 |
28.1255054 |
0.8819171 |
3.141592 |
287.0829163 |
28.1255054 |
0.8819172 |
3.141593 |
287.0828552 |
28.1255054 |
0.8819171 |
Уважаемый посетитель!
Чтобы распечатать файл, скачайте его (в формате Word).
Ссылка на скачивание - внизу страницы.