Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 6 years ago

Language

C

Compiler

gcc 9.1.0

Options
Warnings
C11(GNU)
no pedantic

Author

anonymous

almost 6 years ago

$ gcc prog.c -Wall -Wextra -std=gnu11
prog.c: In function 'bisec':
prog.c:18:1: warning: 'a' is used uninitialized in this function [-Wuninitialized]
   18 | double datax1[a],datax2[b];
      | ^~~~~~
prog.c:18:1: warning: 'b' is used uninitialized in this function [-Wuninitialized]
prog.c:19:10: warning: 'x1' is used uninitialized in this function [-Wuninitialized]
   19 | datax1[0]=x1;
      | ~~~~~~~~~^~~
初期値を入力してください
x1=-10.000000
x2=15.000000
初期値x1=-10.000000,x2=15.000000で求解
0回目:x1=0.000000 x2=0.000000
1回目:x1=-235.921875 x2=-235.921875
2回目:x1=-3.750000 x2=-3.750000
解は-3.750000で、誤差はeps=0.000010です
Exit Code:
0