Akuli / jou

Yet another programming language
MIT License
11 stars 4 forks source link

no expf() function #505

Open Akuli opened 4 months ago

Akuli commented 4 months ago

expf() is the float counterpart of the exp() function declared in stdlib/math.jou. It exists in libc, but not in stdlib/math.jou.

In general, the float versions of all functions seem to be missing.

littlewhitecloud commented 2 months ago

expf() is the float counterpart of the exp() function declared in stdlib/math.jou. It exists in libc, but not in stdlib/math.jou.

In general, the float versions of all functions seem to be missing.

I'm sorry I have missed that, I will make a new pr to add all the float counterpart functions

By the way, is there a list of them?

Akuli commented 2 months ago

I would look at the linux manual pages for the functions. Each manual page documents all variants of the function at once. For example, here's the manual page of the exp function, but it also documents expf and expl: https://linux.die.net/man/3/exp

We don't need expl and other long double functions, because Jou doesn't have a long double datatype.

Akuli commented 2 months ago

I'm sorry I have missed that

I noticed this when we created math.jou, but I didn't mention it. It was probably because Jou didn't have a float datatype at the time, or I thought we wouldn't need the float variants of the functions.

littlewhitecloud commented 2 months ago

I'm sorry I have missed that

I noticed this when we created math.jou, but I didn't mention it. It was probably because Jou didn't have a float datatype at the time, or I thought we wouldn't need the float variants of the functions.

My problem, I have made a pr to add the float type (#181) but I forgot to add float functions in the mathlib pr.