GithubHelp home page GithubHelp logo

ojy0216 / floatconversion Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 2.0 18 KB

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

License: MIT License

C 99.28% Makefile 0.72%
floating-point conversion ieee754 fp16 fp32 fp64 bf16

floatconversion's Introduction

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

floatconversion's People

Contributors

ojy0216 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.