Results 1 to 2 of 2

Thread: How to use a float/double without using float/double keyword?

  1. #1
    Join Date
    Jan 2012
    Beans
    39

    How to use a float/double without using float/double keyword?

    I know this is weird to ask, but how do you set a variable as a decimal without using the keywords float/double?

    I ask this because when I am compiling the Kernel I get an error when I use float/double in the tcp_vegas.c file.

    These are the errors I am getting, if anyone knows how to go around this please let me know. Though like I said it is because I was using the float/double keywords; I used u32 (unsigned 32) to replace the float/double which got rid of the errors.

    Code:
    ERROR: "__addsf3" [net/ipv4/tcp_vegas.ko] undefined
    ERROR: "__fixunssfsi" [net/ipv4/tcp_vegas.ko] undefined
    ERROR: "__mulsf3" [net/ipv4/tcp_vegas.ko] undefined
    ERROR: "__muldf3" [net/ipv4/tcp_vegas.ko] undefined
    ERROR: "__floatsisf" [net/ipv4/tcp_vegas.ko] undefined
    ERROR: "__adddf3" [net/ipv4/tcp_vegas.ko] undefined
    ERROR: "__fixunsdfsi" [net/ipv4/tcp_vegas.ko] undefined
    ERROR: "__floatsidf" [net/ipv4/tcp_vegas.ko] undefined
    ERROR: "__subsf3" [net/ipv4/tcp_vegas.ko] undefined
    So is there an algorithm, function, or a way to do a float/double without using those keywords?
    An example

    float a = 3.145678; //I do not want this
    (some algorithm/function)-> a = 3.145678654; //This is somewhat I want

    I hope this makes sense, if it doesn't I will try to explain it better.

    Thanks

  2. #2
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: How to use a float/double without using float/double keyword?

    This is not at all clear, but whatever it is that you want to do, you probably Can't Do That™. I suggest that you learn C before even trying to hack the kernel.
    「明後日の夕方には帰ってるからね。」


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •