! Pierdere de semnificatie:
! Valorile "exacte" = precizie dubla (f8); sau, cvadrupla (f16).
use ifcore

real(4) x,f,g
real(8) f8
real(16) f16
character(100) fname, c_text*40
logical pressed/.false./


write(*,*) 'Numele fisierului de iesire va fi: "loss-C.rez"'
write(*, '(a,\)') ' Introdu "C" (text <=40 caractere): '
read(*,'(a)') C_text

fname ='loss-'//trim(C_text)//'.rez'

open(1, file=fname, status='unknown')
write(1, '(a,/)') 'Pierdere de Semnificatie'

!write(1,'(1pG8.1, 1pG15.7, 1pG16.8, 3x, 1pG15.7)') x, f, f8, g
write(1, '(a)') ' x         f(x):simpla     f(x):cvadrupla      g(x)'

do i =1,7
x =10.**i
x8 =10D0**i
call fun(x, f, f8, f16, g)
!write(1, '(a)') ' x        f(x):simpla    f(x):dubla           g(x)'
write(1,'(1pG8.1, 1pG16.7, 1pG17.8, 3x, 1pG16.7)') x, f, f16, g

enddo

write(*, '(/,a,a)') 'Fisier de iesire: ', trim(fname)

write(*, '(/,a)') 'Apasa orice tasta'
do while(.not.pressed)
pressed =peekcharqq()
enddo

end
