tags:

views:

154

answers:

3

I am not sure what version of Fortran this is, but the line is:

Term = F*F - 4.*E*G

I know that it multiplies F by F and then subtracts something, but I don't know what the period after the 4 is doing there.

+8  A: 

I'm going to venture a guess based on every other programming language I've ever seen, and say that it's making the constant "4" of type Real, rather than Integer. In other words, it's making sure the types in the expression all match up. "4.0" would be equivalent; whoever wrote this code was just feeling extra concise that day.

Promit
jaredor
+3  A: 

It makes it a real number instead of an integer.

tvanfosson
A: 

If you're new to Fortran, a "REAL" number is what is called in C-like languages a "float".

But only Fortran programmers can say the GOD is REAL, by default.