Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ojy0216/floatConversion

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Floating point number Converter

C implementation of converting floating point number into various formats(FP16, FP32, FP64, bfloat16) and displays into binary, hexadecimal format.

Features

  • Floating points conversion to FP16, FP32, FP64, BF16
  • Displays sign, exponent, mantissa bits
  • Displays hexadecimal representation of floating points
  • Displays converted exact floating point value
  • Input can be floating point number or hexadecimal representation of floating point number()

Usage

Include "fConvert.h" header and compile with "fConvert.c" file

#include "fConvert.h"

Function convert() gets double(FP64) inputs and displays conversion results.

convert(3.141592654);

Example(main.c)

  1. Floating point input
./main 3.141592654

fig1

  1. Hexadecimal input(w/ -h, -s, -d, -b option)
./main 402df84d -s 

fig2

About

Converts a floating-point number or hexadecimal representation of a floating-point numbers into various formats and displays them into binary/hexadecimal.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.