First commit of partial RosettaCode contents.
Pushing this for testing purposes. Lots of work still needed.
This commit is contained in:
commit
1e05ecd7ee
781 changed files with 9080 additions and 0 deletions
2
Task/Infinity/Fortran/infinity-2.f
Normal file
2
Task/Infinity/Fortran/infinity-2.f
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
real :: x
|
||||
real :: huge_real = huge(x)
|
||||
18
Task/Infinity/Fortran/infinity.f
Normal file
18
Task/Infinity/Fortran/infinity.f
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
program to_f_the_ineffable
|
||||
use, intrinsic :: ieee_arithmetic
|
||||
integer :: i
|
||||
real dimension(2) :: y, x = (/ 30, ieee_value(y,ieee_positive_inf) /)
|
||||
|
||||
do i = 1, 2
|
||||
if (ieee_support_datatype(x(i))) then
|
||||
if (ieee_is_finite(x(i))) then
|
||||
print *, 'x(',i,') is finite'
|
||||
else
|
||||
print *, 'x(',i,') is infinite'
|
||||
end if
|
||||
|
||||
else
|
||||
print *, 'x(',i,') is not in an IEEE-supported format'
|
||||
end if
|
||||
end do
|
||||
end program to_f_the_ineffable
|
||||
Loading…
Add table
Add a link
Reference in a new issue