Skip to content

Commit e63b8b7

Browse files
authored
Merge pull request #442 from gmlueck/gmlueck/fast-uses-half-precision
Fix defs of "fast_length" and "fast_normalize"
2 parents a9ef77c + 6457d05 commit e63b8b7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

adoc/chapters/programming_interface.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25656,7 +25656,7 @@ _Constraints:_ Available only if [code]#GeoFloat# is a _float geometric type_
2565625656
as defined above.
2565725657

2565825658
_Returns:_ The length of vector [code]#p# computed as:
25659-
[code]#+sqrt((half)(pow(p[0],2) + pow(p[1],2) + ...))+#.
25659+
[code]#+half_precision::sqrt(pow(p[0],2) + pow(p[1],2) + ...)+#.
2566025660

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

2567825678
_Returns:_ A vector in the same direction as [code]#p# but with a length of 1
25679-
computed as [code]#+p*rsqrt((half)(pow(p[0],2) + pow(p[1],2) + ... ))+#.
25679+
computed as
25680+
[code]#+p * half_precision::rsqrt(pow(p[0],2) + pow(p[1],2) + ...)+#.
2568025681

2568125682
The result shall be within 8192 ulps error from the infinitely precise result
2568225683
of

0 commit comments

Comments
 (0)