Questions tagged [pow]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
438 views

pset3 music - value inf is outside the range of representable values of type 'int'

When I ran my code through the compiler for notes.c, I got the following error: helpers.c:88:26: runtime error: value inf is outside the range of representable values of type 'int'. It then returned ...
0
votes
1answer
80 views

Pset3: Music - how am I supposed to get pow() to parse 1/12ths?

I've been stuck on this for what feels like hours, but I simply don't understand how to get the pow() function to properly deal with n twelfths of 2 I've tried this { double base_hz = 440.00; ...
0
votes
1answer
348 views

pow() function of a float

Why the pow function act like this?, shouldn't the computer consider any integer for example the number 3 as float like this 3.000etc? why it produce different results?
0
votes
1answer
369 views

PSET1 / Credit / Modulo problem / Error: invalid operands to binary expression ('double' and 'double')

I have a problem with a modulo in “Credit”. That is a part of my initial code: #include <stdio.h> #include <cs50.h> #include <math.h> int main(void) { //...
0
votes
1answer
499 views

Problem with pow() function, int frequency, helpers.c, pset3, music

I'm not getting the correct frequencies. When I execute ./notes, C4 through G#4 all return 220, and A4 through B4 return 440. I've determined that the problem must be with pow(), I just don't know ...