Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix defs of "fast_length" and "fast_normalize" #442

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions adoc/chapters/programming_interface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25619,7 +25619,7 @@ _Constraints:_ Available only if [code]#GeoFloat# is a _float geometric type_
as defined above.

_Returns:_ The length of vector [code]#p# computed as:
[code]#+sqrt((half)(pow(p[0],2) + pow(p[1],2) + ...))+#.
[code]#+half_precision::sqrt((pow(p[0],2) + pow(p[1],2) + ...))+#.
gmlueck marked this conversation as resolved.
Show resolved Hide resolved

The return type is [code]#GeoFloat# if the input type is scalar. Otherwise,
the return type is [code]#GeoFloat::value_type#.
Expand All @@ -25639,7 +25639,8 @@ _Constraints:_ Available only if [code]#GeoFloat# is a _float geometric type_
as defined above.

_Returns:_ A vector in the same direction as [code]#p# but with a length of 1
computed as [code]#+p*rsqrt((half)(pow(p[0],2) + pow(p[1],2) + ... ))+#.
computed as
[code]#+p * half_precision::rsqrt((pow(p[0],2) + pow(p[1],2) + ... ))+#.
gmlueck marked this conversation as resolved.
Show resolved Hide resolved

The result shall be within 8192 ulps error from the infinitely precise result
of
Expand Down