Giter VIP home page Giter VIP logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
I cannot seem to be able to reproduce this problem:

petteri@oddish:~/libfixmath$ cat test.c
#include <stdio.h>
#include <fix16.h>

int main()
{
        fix16_t a = fix16_from_dbl(9.9);
        fix16_t b = fix16_from_dbl(9.9);
        fix16_t result = fix16_mul(a, b);
        printf("%f\n", fix16_to_dbl(result));

        return 0;
}
petteri@oddish:~/libfixmath$ gcc -I libfixmath test.c libfixmath/fix16.c
petteri@oddish:~/libfixmath$ ./a.out 
98.009872
petteri@oddish:~/libfixmath$ gcc -I libfixmath -DFIXMATH_NO_64BIT=1 test.c 
libfixmath/fix16.c
petteri@oddish:~/libfixmath$ ./a.out 
98.009872
petteri@oddish:~/libfixmath$ gcc -I libfixmath -DFIXMATH_NO_64BIT=1 
-DFIXMATH_OPTIMIZE_8BIT test.c libfixmath/fix16.c
petteri@oddish:~/libfixmath$ ./a.out 
98.009872

Original comment by Petteri.Aimonen on 14 Apr 2014 at 9:27

from libfixmath.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
My bad, I was using some personalized data types for a MCU on the PC. Got the 
original repo and it works.

Info if you want to reproduce it:

$ uname -a
3.11.0-19-generic #33~precise1-Ubuntu SMP Wed Mar 12 21:16:27 UTC 2014 x86_64 
x86_64 x86_64 GNU/Linux

typedef char int8_t;
typedef unsigned char uint8_t;
typedef int int16_t;
typedef unsigned int uint16_t;
typedef unsigned long uint32_t;
typedef long int32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;

Original comment by [email protected] on 14 Apr 2014 at 10:24

from libfixmath.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024

Original comment by Petteri.Aimonen on 15 Apr 2014 at 2:39

  • Changed state: Invalid

from libfixmath.

Related Issues (20)

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.