Weird values from an int function

Hey Guys,

I'm stuck with an error that I don't understand in any way:

This is not exactly my code but it does the same:

Serial.print(funktion1(voltage));

int funktion1(float value){
    if (value < 1,5){
         return 1;
    }
    else{
    return 0;
}
}

I would expect this to give me either 0 or 1 but it gives me values like: -1793 or 2355.
This part of the code worked fine until I started to add EEPROM operations. Does anybody has an idear on this?

Thanks in advance

Something else is going on with the code you did not post.

It works fine for me.

Just found my mistake: In function1 I checked for else if instead of else and that if was not the case anymore so it did not return anything, therefore I had these weird Numbers.

ieee488:
It works fine for me.

if (value < 1,5){

how are decimal values represented in C++?
what is the comma operator?