Questions tagged as 'fortran'

1
answer

Fortran code adaptation for python [RuntimeWarning: overflow encountered in double_scalars]

I tried to adapt the following code in fortran for python: PROGRAM Escape_tent IMPLICIT NONE ! Declare local variables INTEGER :: i,j,tfinal,P,k,rede Real,dimension(0:2800) :: x,xn real, external :: f Real :: sigma,pi,soma,r pi=4.*atan(1.0) !...
asked by 30.12.2018 / 20:08
0
answers

How to create a tridiagonal array in Python?

Hello, I'd like to know how to write a tridiagonal NxN array. I have three vectors that will be updated in a loop. I'm working on something similar to this: Note: I would just like to know about zeros and what Python parameters I could...
asked by 21.05.2018 / 14:16
1
answer

Error to run program in fortran

I need to calculate the minimum common divisor in fortran, I did the code, but when it compiles and runs, it closes after the user types the value and I do not know what is wrong. PROGRAM Calc IMPLICIT NONE REAL :: valor,contador=0, divisao wr...
asked by 01.12.2017 / 04:35
1
answer

Error in Fortran

I have this programming in Python: from time import sleep #importando biblioteca para usar a função sleep G = 6.67408 * (10 ** -11) M1 = 1.98*(10**30) Xo = 15 * (10 ** 10) Yo = 0 Voy = 2.97 * (10 ** 4) Vox = 0 ax, ay, t = 1, 1, 0 for t in ra...
asked by 25.07.2018 / 03:47