Upcoming SlideShare
×

# NSEG17 バグのはなし

711

Published on

2011.7.23 NSEG#17 懇親会LT
Mozillaとの合同勉強会の懇親会だったけど、ぜんぜんWebとは関係の無いネタ

この日だけ使えたネタ

2 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

Views
Total Views
711
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
0
0
Likes
2
Embeds 0
No embeds

No notes for slide

### Transcript of "NSEG17 バグのはなし"

1. 1. a = 0;if (a == 1); { ... //}
2. 2. a = 0;if (a == 1); { ... //}
3. 3. #define p(n) pp[n+10]// a <- pfor (int i = 0; i < n; i++) { a[i] = p(i);}
4. 4. #define p(n) pp[n+10]// a <- pfor (int i = 0; i < j; i++) { a[i] = p(i);}
5. 5. for (int j = 0; j < J; j++) {for (int i = 0; i < J; i++) { a[j][i] = b[j][i] * c[j][i];}}
6. 6. for (int j = 0; j < J; j++) {for (int i = 0; i < J; i++) { a[j][i] = b[j][i] * c[j][i];}}
7. 7. double a = 1.0e-20;double b = 1.0e10;double c = 1.0e40;...// ans <- 1.0e30double ans = a * b * c;
8. 8. double a = 1.0e-20;double b = 1.0e10;double c = 1.0e40;...// ans <- 1.0e30 * 1.0e400double ans = a * (b * c);
9. 9. voidreduct(int* a, int* b, int n){ for (int i = 0; i < n; i++) { a[i] += b[i]; }}
10. 10. voidreduct(int* a, int* b, int n){ for (int i = 0; i < n; i++) { a[i] += b[i]; }}