IEEE754 converter v3
  1. All files
  2. HP Prime Programs
  3. HP Prime Math Programs
  1. All files
  2. HP Prime Programs
  3. HP Prime Science Programs

Description

IEEE754 converter v3

Today, the most prevalent representation of real numbers on computers is IEEE Standard 754 floating point.
This function converts floats to hexadecimal or vice versa using the IEEE-754 standard introduced in SSE instructions set.

Syntax:

IEEE754(a, b)

"a" can be a decimal, hexadecimal or a string.
Hexadecimals are case-sensitive and must be uppercase.
Strings must be used to convert decimals with more than 12 digits.
In CAS mode strings must be used when convert from hexadecimals to floats e.g. IEEE754 ("#123h",16).
In CAS mode when convert from floats to hexadecimals, the result will be a string.

"b" can only be :
0 - Display this help
8, 16, 32 or 64 - bits base conversion
If bases are negative the result will show a string with more digits.

Examples:
IEEE754 (3.14159265359, 64) → #400921FB54442EEAh;
IEEE754 (#400921FB54442EEAh, 64) → 3.14159265359;
IEEE754 ("3.141592653589793", 64) → #400921FB54442D18h;
IEEE754 (#400921FB54442D18h, -64) → "3.14159265358979311599796346854"

In CAS mode:
IEEE754 ("#6Dh",8) → 14.5
IEEE754 (14.5, 8) → "#6Dh"

If you find any error, please report to joaocaminha968@gmail.com
Thank you.

Screenshots

Screenshot #10374

Archive Contents

Name Size
IEEE754 converter v3/IEEE754.hpprgm 41.2 KB
IEEE754 converter v3/README.txt 1.2 KB
Download file
File Size
8.0 KB

Metadata

Author
joaocaminha
Uploaded

Links

Discussion thread
https://www.hpmuseum.org/forum/thread-24122.html

Statistics

Rating
No ratings.
Downloads
36
↳ this version
13
Views
268
↳ this version
150

Reviews

Nobody has reviewed this file yet.

Versions

  1. IEEE754 converter v3 (published 3 weeks, 4 days ago; 2025-10-13 13:04 UTC)
  2. IEEE754 converter v1.0 (published 1 month, 1 week ago; 2025-09-28 19:03 UTC)

Advertisement