Anonymous | Login | Signup for a new account | 2024-11-24 09:17 MSK |
Main | My View | View Issues | Change Log | Roadmap | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||
0000332 | [ALGLIB] General | major | have not tried | 2010-05-18 19:47 | 2010-05-26 12:34 | ||
Reporter | artyomstv | View Status | public | ||||
Assigned To | SergeyB | ||||||
Priority | normal | Resolution | fixed | ||||
Status | resolved | Product Version | |||||
Summary | 0000332: FIXED: Mistake in C++ implementation of ap::complex::operator/=(complex& z) | ||||||
Description |
Wrong code: if( fabs(z.y)<fabs(z.x) ){ e = z.y/z.x; f = z.x+z.y*e; result.x = (z.x+z.y*e)/f; result.y = (z.y-z.x*e)/f; } else { e = z.x/z.y; f = z.y+z.x*e; result.x = (z.y+z.x*e)/f; result.y = (-z.x+z.y*e)/f; } Correct code: if( fabs(z.y)<fabs(z.x) ){ e = z.y/z.x; f = z.x+z.y*e; result.x = (x+y*e)/f; result.y = (y-x*e)/f; } else { e = z.x/z.y; f = z.y+z.x*e; result.x = (y+x*e)/f; result.y = (y*e-x)/f; } |
||||||
Additional Information | Have not checked any other operators. Maybe it is neccessary to check them. | ||||||
Programming language | C++ | ||||||
Attached Files | |||||||
|
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |