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

  • Home
  • SEARCH
  • 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 3354526
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:17:01+00:00 2026-05-18T02:17:01+00:00

I have to work with some (semi-)automatical verification software (CBMC (link) ) which is

  • 0

I have to work with some (semi-)automatical verification software (CBMC (link)) which is statically working on C sources. Floating point is supported, but there are no definitions for all the mathematical functions. The attempt is to check, if it’s possible to check numerical software with it.

So I need these functions. I’m looking for some math.h definitions without co-processor use (e.g. sqrt, pow, remainder, tan; int/float/double).

When I looked for it in a libc shipped with some linux distributions (maybe now eglibc), I always reached a point, where there are some processor-intrinsics meaning a hardware sqrt-function for example.

Part 1: searching for software implementations

What I need is a library supporting mathematical functions with the following characteristics:

  • IEEE Floating-Point is supported, but a library operating purely on integers would be great too, maybe better.
  • Correctness is a critical factor. (known bugs for special cases hidden in some sources are not that cool). The results should also be correct in terms of IEEE-754 (e.g. rules for sqrt).
  • No use of co-processor calls. Pure software. C is preferred, but asm should be okay too.

Until now, I searched a bit for various libc implementations, especially ones regarding embedded systems. I think most of these libraries are targeting portability and size of compiled programs, but hard to tell if they are using processor-specific instructions.

  • **fdlibm seems to have some pure-software definitions at a first glance. I will inspect this further. But there are some bugs mentioned in the sources (code isn’t standard).
  • **newlib seems to bring the same definitions (based on code of sun microsystems). But i can’t say for sure at the moment if these software versions are alway used, so that there maybe some co-processor calls i don’t see at the moment (see part 2).
  • **uClibc seems to share the characteristic with newlib.

Part 2: understanding the structure of these implementations

  • Could someone give me a short introduction to the structure of these math libraries. How do they dispatch the various versions (e.g. a specific co-processor)?

  • And what are the meaning of these different prefixes in the filenames. e_sqrt.c, k_sin, s_sin?

I would be happy to hear about some libraries which could be useful for me. I would prefer to take a library as it comes, but when it is necessary, it is also possible to look for some single function implementations and build up a small library. I won’t use all of the functions defined in math.h.

This and this SO-posts are saying that the Java Math Implementation is/was based on fdlibm which sounds that this library is the way to go. Anyone with more information about this library I should know?

Seems that I have many possibilities including the following two:

  1. Use glibc and compile in software-mode. The problem is, that I can’t use any of the automatic system checking tools (in configure). I have to give all the information manually. Are there any flags to forbid the use of the fp-coprocessor and to forbid simd-operations? fp-without should be a start, then it is also using soft-float if it compiles. I expect that the compilation process is more or less dependent on a specific decision for a host (like arm…).
  2. Use fdlibm (preferred at the moment). Problem: how do I link my programs to it? I need the non-libm functions like assert, but want to link against my fdlibm and not the system-libm which is installed (so -nodefaultlibs will forbid the use of assert).
  • 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-18T02:17:01+00:00Added an answer on May 18, 2026 at 2:17 am

    There’s a full software implementation of IEEE-754 in glibc/sysdeps/ieee754. When you compile the library it might automatically substitute in an architecture specific version (eg ia64/fpu/e_acosf.S) of some function, but the entire library is implemented in software as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have some integer arithmetic which for historical reasons has to work the same
I have to work on some code that's using generic lists to store a
I have some AJAX work that brings across an additional form element that I
I have to do some work work with integers, but I am interested in
I have to work on several VB6 legacy projects and despite some good VB6
I have a console application. A class (let's say Worker) does some work in
Traditionally, when we use SQL string to done some work, we have to close
I have a request for some contract work from an organization that uses Excel
I have a project I am doing some maintenance work on and have got
I have some workflow to work with in Worflow foundation. I need to follow

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.