---
title: FORTRAN
code: |-
  program FLOATMATHTEST
    real(kind=4) :: x4, y4
    real(kind=8) :: x8, y8
    real(kind=16) :: x16, y16
    ! REAL literals are single precision, use _8 or _16
    ! if the literal should be wider.
    x4 = .1; x8 = .1_8; x16 = .1_16
    y4 = .2; y8 = .2_8; y16 = .2_16
    write (*,*) x4 + y4, x8 + y8, x16 + y16
  end
result: |-
  0.300000012  
  0.30000000000000004  
  0.300000000000000000000000000000000039
---
