Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

math.h and lib for BoostC?

Status
Not open for further replies.
futz said:
I keep needing things like abs().

Never tried BoostC but from what I find with Google (mostly old forum posts) it looks like it might be a roll-your-own situation. Or maybe you could copy some of the headers and libs from libc (do you have Linux?).

Code:
int abs(int n) {
    return n > 0 ? n : -n;
}

Torben

[Edit: You can browse the libc code here: **broken link removed** ]
 
Last edited:
Torben said:
Never tried BoostC but from what I find with Google (mostly old forum posts) it looks like it might be a roll-your-own situation.
I was starting to get that idea anyway, judging by the posts on SourceBoost's forums. Shouldn't be that hard to write one anyway.

It's been many many years since I built my own libs for C. I'll have to refresh my foggy old memory.

Or maybe you could copy some of the headers and libs from libc (do you have Linux?).
Good idea. I have almost nothing but Linux. There's windoze on only a few of my too many computers.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top