Skip to content

Add implementations of IEEE pown function. #20

@delphidabbler

Description

@delphidabbler

This function raises real numbers to integral powers.

According to IEEE Std 754-2008 for Floating-Point Arithmetic, page 44:

  • pown(x, 0) is 1 for any x (even a zero, quiet NaN, or infinity)
  • pown(±0, n) is ±∞ and signals the divideByZero exception for odd integral n<0
  • pown(±0, n) is +∞ and signals the divideByZero exception for even integral n<0
  • pown(±0, n) is +0 for even integral n>0
  • pown(±0, n) is ±0 for odd integral n>0.

In addition to actual pown function more restricted versions would be useful:

  • version that raises integers to non-negative powers (will have integral output)
  • version that raises integers to integer powers (will have real output due to -ve powers being permitted)

Metadata

Metadata

Assignees

Labels

completedIssue completed and committed to develop. To be closed on next releaseenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy