(self)
| 280 | self.assertEqual(float(negative_exp(30000)), 1.0) |
| 281 | |
| 282 | def test_particular(self): |
| 283 | # inputs that produced crashes or incorrectly rounded results with |
| 284 | # previous versions of dtoa.c, for various reasons |
| 285 | test_strings = [ |
| 286 | # issue 7632 bug 1, originally reported failing case |
| 287 | '2183167012312112312312.23538020374420446192e-370', |
| 288 | # 5 instances of issue 7632 bug 2 |
| 289 | '12579816049008305546974391768996369464963024663104e-357', |
| 290 | '17489628565202117263145367596028389348922981857013e-357', |
| 291 | '18487398785991994634182916638542680759613590482273e-357', |
| 292 | '32002864200581033134358724675198044527469366773928e-358', |
| 293 | '94393431193180696942841837085033647913224148539854e-358', |
| 294 | '73608278998966969345824653500136787876436005957953e-358', |
| 295 | '64774478836417299491718435234611299336288082136054e-358', |
| 296 | '13704940134126574534878641876947980878824688451169e-357', |
| 297 | '46697445774047060960624497964425416610480524760471e-358', |
| 298 | # failing case for bug introduced by METD in r77451 (attempted |
| 299 | # fix for issue 7632, bug 2), and fixed in r77482. |
| 300 | '28639097178261763178489759107321392745108491825303e-311', |
| 301 | # two numbers demonstrating a flaw in the bigcomp 'dig == 0' |
| 302 | # correction block (issue 7632, bug 3) |
| 303 | '1.00000000000000001e44', |
| 304 | '1.0000000000000000100000000000000000000001e44', |
| 305 | # dtoa.c bug for numbers just smaller than a power of 2 (issue |
| 306 | # 7632, bug 4) |
| 307 | '99999999999999994487665465554760717039532578546e-47', |
| 308 | # failing case for off-by-one error introduced by METD in |
| 309 | # r77483 (dtoa.c cleanup), fixed in r77490 |
| 310 | '965437176333654931799035513671997118345570045914469' #... |
| 311 | '6213413350821416312194420007991306908470147322020121018368e0', |
| 312 | # incorrect lsb detection for round-half-to-even when |
| 313 | # bc->scale != 0 (issue 7632, bug 6). |
| 314 | '104308485241983990666713401708072175773165034278685' #... |
| 315 | '682646111762292409330928739751702404658197872319129' #... |
| 316 | '036519947435319418387839758990478549477777586673075' #... |
| 317 | '945844895981012024387992135617064532141489278815239' #... |
| 318 | '849108105951619997829153633535314849999674266169258' #... |
| 319 | '928940692239684771590065027025835804863585454872499' #... |
| 320 | '320500023126142553932654370362024104462255244034053' #... |
| 321 | '203998964360882487378334860197725139151265590832887' #... |
| 322 | '433736189468858614521708567646743455601905935595381' #... |
| 323 | '852723723645799866672558576993978025033590728687206' #... |
| 324 | '296379801363024094048327273913079612469982585674824' #... |
| 325 | '156000783167963081616214710691759864332339239688734' #... |
| 326 | '656548790656486646106983450809073750535624894296242' #... |
| 327 | '072010195710276073042036425579852459556183541199012' #... |
| 328 | '652571123898996574563824424330960027873516082763671875e-1075', |
| 329 | # demonstration that original fix for issue 7632 bug 1 was |
| 330 | # buggy; the exit condition was too strong |
| 331 | '247032822920623295e-341', |
| 332 | # demonstrate similar problem to issue 7632 bug1: crash |
| 333 | # with 'oversized quotient in quorem' message. |
| 334 | '99037485700245683102805043437346965248029601286431e-373', |
| 335 | '99617639833743863161109961162881027406769510558457e-373', |
| 336 | '98852915025769345295749278351563179840130565591462e-372', |
| 337 | '99059944827693569659153042769690930905148015876788e-373', |
| 338 | '98914979205069368270421829889078356254059760327101e-372', |
| 339 | # issue 7632 bug 5: the following 2 strings convert differently |
nothing calls this directly
no test coverage detected