• Home
  • Raw
  • Download

Lines Matching refs:pow_op

368         for pow_op in pow, operator.pow:
370 self.assertTrue(isnan(pow_op(-INF, NAN)))
371 self.assertTrue(isnan(pow_op(-2.0, NAN)))
372 self.assertTrue(isnan(pow_op(-1.0, NAN)))
373 self.assertTrue(isnan(pow_op(-0.5, NAN)))
374 self.assertTrue(isnan(pow_op(-0.0, NAN)))
375 self.assertTrue(isnan(pow_op(0.0, NAN)))
376 self.assertTrue(isnan(pow_op(0.5, NAN)))
377 self.assertTrue(isnan(pow_op(2.0, NAN)))
378 self.assertTrue(isnan(pow_op(INF, NAN)))
379 self.assertTrue(isnan(pow_op(NAN, NAN)))
382 self.assertTrue(isnan(pow_op(NAN, -INF)))
383 self.assertTrue(isnan(pow_op(NAN, -2.0)))
384 self.assertTrue(isnan(pow_op(NAN, -1.0)))
385 self.assertTrue(isnan(pow_op(NAN, -0.5)))
386 self.assertTrue(isnan(pow_op(NAN, 0.5)))
387 self.assertTrue(isnan(pow_op(NAN, 1.0)))
388 self.assertTrue(isnan(pow_op(NAN, 2.0)))
389 self.assertTrue(isnan(pow_op(NAN, INF)))
392 self.assertRaises(ZeroDivisionError, pow_op, -0.0, -1.0)
393 self.assertRaises(ZeroDivisionError, pow_op, 0.0, -1.0)
397 self.assertRaises(ZeroDivisionError, pow_op, -0.0, -2.0)
398 self.assertRaises(ZeroDivisionError, pow_op, -0.0, -0.5)
399 self.assertRaises(ZeroDivisionError, pow_op, 0.0, -2.0)
400 self.assertRaises(ZeroDivisionError, pow_op, 0.0, -0.5)
403 self.assertEqualAndEqualSign(pow_op(-0.0, 1.0), -0.0)
404 self.assertEqualAndEqualSign(pow_op(0.0, 1.0), 0.0)
407 self.assertEqualAndEqualSign(pow_op(-0.0, 0.5), 0.0)
408 self.assertEqualAndEqualSign(pow_op(-0.0, 2.0), 0.0)
409 self.assertEqualAndEqualSign(pow_op(0.0, 0.5), 0.0)
410 self.assertEqualAndEqualSign(pow_op(0.0, 2.0), 0.0)
413 self.assertEqualAndEqualSign(pow_op(-1.0, -INF), 1.0)
414 self.assertEqualAndEqualSign(pow_op(-1.0, INF), 1.0)
417 self.assertEqualAndEqualSign(pow_op(1.0, -INF), 1.0)
418 self.assertEqualAndEqualSign(pow_op(1.0, -2.0), 1.0)
419 self.assertEqualAndEqualSign(pow_op(1.0, -1.0), 1.0)
420 self.assertEqualAndEqualSign(pow_op(1.0, -0.5), 1.0)
421 self.assertEqualAndEqualSign(pow_op(1.0, -0.0), 1.0)
422 self.assertEqualAndEqualSign(pow_op(1.0, 0.0), 1.0)
423 self.assertEqualAndEqualSign(pow_op(1.0, 0.5), 1.0)
424 self.assertEqualAndEqualSign(pow_op(1.0, 1.0), 1.0)
425 self.assertEqualAndEqualSign(pow_op(1.0, 2.0), 1.0)
426 self.assertEqualAndEqualSign(pow_op(1.0, INF), 1.0)
427 self.assertEqualAndEqualSign(pow_op(1.0, NAN), 1.0)
430 self.assertEqualAndEqualSign(pow_op(-INF, 0.0), 1.0)
431 self.assertEqualAndEqualSign(pow_op(-2.0, 0.0), 1.0)
432 self.assertEqualAndEqualSign(pow_op(-1.0, 0.0), 1.0)
433 self.assertEqualAndEqualSign(pow_op(-0.5, 0.0), 1.0)
434 self.assertEqualAndEqualSign(pow_op(-0.0, 0.0), 1.0)
435 self.assertEqualAndEqualSign(pow_op(0.0, 0.0), 1.0)
436 self.assertEqualAndEqualSign(pow_op(0.5, 0.0), 1.0)
437 self.assertEqualAndEqualSign(pow_op(1.0, 0.0), 1.0)
438 self.assertEqualAndEqualSign(pow_op(2.0, 0.0), 1.0)
439 self.assertEqualAndEqualSign(pow_op(INF, 0.0), 1.0)
440 self.assertEqualAndEqualSign(pow_op(NAN, 0.0), 1.0)
441 self.assertEqualAndEqualSign(pow_op(-INF, -0.0), 1.0)
442 self.assertEqualAndEqualSign(pow_op(-2.0, -0.0), 1.0)
443 self.assertEqualAndEqualSign(pow_op(-1.0, -0.0), 1.0)
444 self.assertEqualAndEqualSign(pow_op(-0.5, -0.0), 1.0)
445 self.assertEqualAndEqualSign(pow_op(-0.0, -0.0), 1.0)
446 self.assertEqualAndEqualSign(pow_op(0.0, -0.0), 1.0)
447 self.assertEqualAndEqualSign(pow_op(0.5, -0.0), 1.0)
448 self.assertEqualAndEqualSign(pow_op(1.0, -0.0), 1.0)
449 self.assertEqualAndEqualSign(pow_op(2.0, -0.0), 1.0)
450 self.assertEqualAndEqualSign(pow_op(INF, -0.0), 1.0)
451 self.assertEqualAndEqualSign(pow_op(NAN, -0.0), 1.0)
455 self.assertEqual(type(pow_op(-2.0, -0.5)), complex)
456 self.assertEqual(type(pow_op(-2.0, 0.5)), complex)
457 self.assertEqual(type(pow_op(-1.0, -0.5)), complex)
458 self.assertEqual(type(pow_op(-1.0, 0.5)), complex)
459 self.assertEqual(type(pow_op(-0.5, -0.5)), complex)
460 self.assertEqual(type(pow_op(-0.5, 0.5)), complex)
463 self.assertEqualAndEqualSign(pow_op(-0.5, -INF), INF)
464 self.assertEqualAndEqualSign(pow_op(-0.0, -INF), INF)
465 self.assertEqualAndEqualSign(pow_op(0.0, -INF), INF)
466 self.assertEqualAndEqualSign(pow_op(0.5, -INF), INF)
469 self.assertEqualAndEqualSign(pow_op(-INF, -INF), 0.0)
470 self.assertEqualAndEqualSign(pow_op(-2.0, -INF), 0.0)
471 self.assertEqualAndEqualSign(pow_op(2.0, -INF), 0.0)
472 self.assertEqualAndEqualSign(pow_op(INF, -INF), 0.0)
475 self.assertEqualAndEqualSign(pow_op(-0.5, INF), 0.0)
476 self.assertEqualAndEqualSign(pow_op(-0.0, INF), 0.0)
477 self.assertEqualAndEqualSign(pow_op(0.0, INF), 0.0)
478 self.assertEqualAndEqualSign(pow_op(0.5, INF), 0.0)
481 self.assertEqualAndEqualSign(pow_op(-INF, INF), INF)
482 self.assertEqualAndEqualSign(pow_op(-2.0, INF), INF)
483 self.assertEqualAndEqualSign(pow_op(2.0, INF), INF)
484 self.assertEqualAndEqualSign(pow_op(INF, INF), INF)
487 self.assertEqualAndEqualSign(pow_op(-INF, -1.0), -0.0)
490 self.assertEqualAndEqualSign(pow_op(-INF, -0.5), 0.0)
491 self.assertEqualAndEqualSign(pow_op(-INF, -2.0), 0.0)
494 self.assertEqualAndEqualSign(pow_op(-INF, 1.0), -INF)
497 self.assertEqualAndEqualSign(pow_op(-INF, 0.5), INF)
498 self.assertEqualAndEqualSign(pow_op(-INF, 2.0), INF)
501 self.assertEqualAndEqualSign(pow_op(INF, 0.5), INF)
502 self.assertEqualAndEqualSign(pow_op(INF, 1.0), INF)
503 self.assertEqualAndEqualSign(pow_op(INF, 2.0), INF)
506 self.assertEqualAndEqualSign(pow_op(INF, -2.0), 0.0)
507 self.assertEqualAndEqualSign(pow_op(INF, -1.0), 0.0)
508 self.assertEqualAndEqualSign(pow_op(INF, -0.5), 0.0)
511 self.assertEqualAndEqualSign(pow_op(-2.0, -2.0), 0.25)
512 self.assertEqualAndEqualSign(pow_op(-2.0, -1.0), -0.5)
513 self.assertEqualAndEqualSign(pow_op(-2.0, -0.0), 1.0)
514 self.assertEqualAndEqualSign(pow_op(-2.0, 0.0), 1.0)
515 self.assertEqualAndEqualSign(pow_op(-2.0, 1.0), -2.0)
516 self.assertEqualAndEqualSign(pow_op(-2.0, 2.0), 4.0)
517 self.assertEqualAndEqualSign(pow_op(-1.0, -2.0), 1.0)
518 self.assertEqualAndEqualSign(pow_op(-1.0, -1.0), -1.0)
519 self.assertEqualAndEqualSign(pow_op(-1.0, -0.0), 1.0)
520 self.assertEqualAndEqualSign(pow_op(-1.0, 0.0), 1.0)
521 self.assertEqualAndEqualSign(pow_op(-1.0, 1.0), -1.0)
522 self.assertEqualAndEqualSign(pow_op(-1.0, 2.0), 1.0)
523 self.assertEqualAndEqualSign(pow_op(2.0, -2.0), 0.25)
524 self.assertEqualAndEqualSign(pow_op(2.0, -1.0), 0.5)
525 self.assertEqualAndEqualSign(pow_op(2.0, -0.0), 1.0)
526 self.assertEqualAndEqualSign(pow_op(2.0, 0.0), 1.0)
527 self.assertEqualAndEqualSign(pow_op(2.0, 1.0), 2.0)
528 self.assertEqualAndEqualSign(pow_op(2.0, 2.0), 4.0)
532 self.assertEqualAndEqualSign(pow_op(1.0, -1e100), 1.0)
533 self.assertEqualAndEqualSign(pow_op(1.0, 1e100), 1.0)
534 self.assertEqualAndEqualSign(pow_op(-1.0, -1e100), 1.0)
535 self.assertEqualAndEqualSign(pow_op(-1.0, 1e100), 1.0)
538 self.assertEqualAndEqualSign(pow_op(-2.0, -2000.0), 0.0)
539 self.assertEqual(type(pow_op(-2.0, -2000.5)), complex)
540 self.assertEqualAndEqualSign(pow_op(-2.0, -2001.0), -0.0)
541 self.assertEqualAndEqualSign(pow_op(2.0, -2000.0), 0.0)
542 self.assertEqualAndEqualSign(pow_op(2.0, -2000.5), 0.0)
543 self.assertEqualAndEqualSign(pow_op(2.0, -2001.0), 0.0)
544 self.assertEqualAndEqualSign(pow_op(-0.5, 2000.0), 0.0)
545 self.assertEqual(type(pow_op(-0.5, 2000.5)), complex)
546 self.assertEqualAndEqualSign(pow_op(-0.5, 2001.0), -0.0)
547 self.assertEqualAndEqualSign(pow_op(0.5, 2000.0), 0.0)
548 self.assertEqualAndEqualSign(pow_op(0.5, 2000.5), 0.0)
549 self.assertEqualAndEqualSign(pow_op(0.5, 2001.0), 0.0)