Skip to main content

Questions tagged [pow]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer

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 ...
Prav Elan's user avatar
0 votes
1 answer

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; ...
user avatar
0 votes
1 answer

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?
Sengo's user avatar
  • 7
0 votes
1 answer

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) { //...
Olga's user avatar
  • 28
0 votes
1 answer

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 ...
IMH's user avatar
  • 3