- #1

autobot.d

- 68

- 0

DOUBLE PRECISION :: bound = 10**270

Error: Arithmetic overflow at (1)

.\q2.f03:70.4:

where 1 is beneath the first *.

I am sure it is something simple I am overlooking...

You are using an out of date browser. It may not display this or other websites correctly.

You should upgrade or use an alternative browser.

You should upgrade or use an alternative browser.

- Fortran
- Thread starter autobot.d
- Start date

- #1

autobot.d

- 68

- 0

DOUBLE PRECISION :: bound = 10**270

Error: Arithmetic overflow at (1)

.\q2.f03:70.4:

where 1 is beneath the first *.

I am sure it is something simple I am overlooking...

- #2

AlephZero

Science Advisor

Homework Helper

- 7,025

- 297

You could write 10.0d0 ** 270, or better, just 10.0d270.

Note you must use a "d" exponent (not "e") in a constant to make it double precision. 10.0 ** 270 will still give an overflow, because 10.0 is a single precision constant and the maximum value that can be represented in single precision is about 10

Share:

- Last Post

- Replies
- 12

- Views
- 539

- Last Post

- Replies
- 8

- Views
- 553

- Last Post

- Replies
- 5

- Views
- 806

- Last Post

- Replies
- 4

- Views
- 567

- Last Post

- Replies
- 2

- Views
- 414

- Last Post

- Replies
- 8

- Views
- 1K

- Replies
- 37

- Views
- 2K

- Last Post

- Replies
- 4

- Views
- 805

- Last Post

- Replies
- 22

- Views
- 569

Fortran
Fortran runtime error

- Last Post

- Replies
- 17

- Views
- 3K