Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1051825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:59:46+00:00 2026-05-16T16:59:46+00:00

Is this possible to extract mantissa and exponent from a float in major R6RS

  • 0

Is this possible to extract mantissa and exponent from a float in major R6RS Scheme implementations so that:
v = f x b^e
f – mantissa
b – base
e – exponent

For example: 3.14 = 0.785 x 2^2

If it’s not supported, I’d like to have access to flonum’s (IEEE 754) bits directly to approach the problem of extracting the above values, but I’ve found no function to convert flonum to a series of bytes (bytevector).

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T16:59:47+00:00Added an answer on May 16, 2026 at 4:59 pm

    http://www.r6rs.org/final/html/r6rs-lib/r6rs-lib-Z-H-3.html#node_sec_2.8

    — Procedure: bytevector-ieee-double-native-set! BYTEVECTOR K X
    — Procedure: bytevector-ieee-double-set! BYTEVECTOR K X ENDIANNESS

    K, …, K+7 must be valid indices of BYTEVECTOR.

    For `BYTEVECTOR-IEEE-DOUBLE-NATIVE-SET!’, K must be a multiple of 8.

    These procedures store an IEEE 754 double-precision representation of X into elements K through K+7 of BYTEVECTOR, and return unspecified values.

    Here it is in use:

    > (define bv (make-bytevector 8))
    > (bytevector-ieee-double-native-set! bv 0 1.0)
    > bv
    #vu8(0 0 0 0 0 0 240 63)
    

    To verify the result, here is a C program which accesses the bytes directly:

    #include <stdio.h>
    
    int main(void)
    {
      double x = 1.0;
      unsigned char *p = &x;
    
      for (size_t i = 0; i < sizeof(double); i++)
        printf("%u ", p[i]);
    
      puts("");
    
      return 0;
    }
    
    0 0 0 0 0 0 240 63 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is this possible? I am creating a single base factory function to drive factories
Is this possible? I've followed the instructions from here ( http://www.jetbrains.net/confluence/display/TCD4/Setting+up+an+External+Database#SettingupanExternalDatabase-MicrosoftSQLServer2005 ) but I
Is this possible? example: $('a.change').click(function(){ //code to change p tag to h5 tag });
Is this possible? Situation is that I want to store some XML in my
Is this possible? Using SQL Server 2005....... SELECT * FROM Data0304 UNION SELECT *
Possible Duplicate: extract last part of a url I have a url like this:
Is it possible to extract month element from the date using SPARQL and group
I have a multi-dimensional array that looks like this: The base array is indexed
Is it possible to extract date recorded from mp3 files? Are there any audio
Is it possible to extract columns from two different database in sqlite3? My problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.