ayush00git opened a new pull request, #3235:
URL: https://github.com/apache/fory/pull/3235

   Referenced Issue - #3206 
   
   I've gone through the references in the #3206 issue and here are my 
implementation plans for the `float16` type in go.
   
   1. Keep all the work in a separate folder under `go/fory/float16`
   2. Core Type Definition (`float16.go`): Create a new `Float16` type based on 
`uint16` to hold the raw bits, implementing essential constants (`NaN`, `Inf`) 
and conversion methods (`FromFloat32()`, `Float32()`) that handle IEEE 754 
logic.
   3. Math & Utility Methods: Implement arithmetic operations (`Add`, `Sub`, 
`Mul`, `Div`) by temporarily promoting values to `float32` for calculation, 
along with classification helpers like `IsNaN`, `IsFinite`, and strict IEEE 754 
comparison methods (`Equal`, `Less`).
   4. Serialization Logic (`float16_serializer.go`): Develop a dedicated 
`float16Serializer` that handles writing the 2-byte structure to the wire with 
the correct `FLOAT16` tag and reading it back.
   5. System Integration (`types.go`, `primitive.go`): Update the Fory type 
system to recognize `float16` by adding new Dispatch IDs 
(`PrimitiveFloat16DispatchId`), registering the serializer, and setting the 
fixed size to 2 bytes.
   6. I/O & Array Support (`writer.go`, `reader.go`, `array_primitive.go`): 
Modify the main read/write loops to process the new Dispatch IDs and add 
support for efficient `[]float16` arrays using the `FLOAT16_ARRAY` wire type.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to