Psst...

Do you want to get language learning tips and resources every week or two? Join our mailing list to receive new ways to improve your language learning in your inbox!

Join the list

English Audio Request

gihar
185 Words / 2 Recordings / 3 Comments
Note to recorder:

Natural speed please

It appears someone decided that if you get an +-NAN or +-INFINITY they should throw an exception if one sends it to an printf statement.

I don't know the whys and wherefores of such an idea, it is causing some problems with an application I am writing. What I am use to is +INF -INF and +NAN -NAN being printed instead of exceptions.

These are valid floating point numbers, I am not quite getting why one should throw an exception.
Not all of such things happen inside the computer that is reading the data.

As said I don't get why it does this. However I need a way to get around this behavior so I can SEE the +-INF and +-NAN numbers.

Suggestions? Do I have to have exception handling on all floating point numbers using sprintf for formating?

Is there a way to get the sprintf function to behave like most and just print the +-INF/+-NAN...instead?
For me it's perfectly VALID data as I said (something else is generating it), so I just want to see that it is +-INF/+-NAN...and not throw a fit.

Recordings

Comments

kohlrak
Jan. 21, 2014

Before i read this one, the answer is simple:

I think even the fist instruction on the x86 will throw that. And the easiest way to get the number out is to fist then do multiplication by 10^n where n is the number of digits you want to handle, then fistp.

The problem is, the FPU can't handle infinity, and you can't do math on NaN because it's Not a Number (NaN). The CLIB expects YOU to check your work, that way it can focus on being speedy. Why build in slow checking if most of the time people aren't going to be printing back out use input? That's the programmer's job. Notice they don't check strings?

gihar
Jan. 22, 2014

kohlrak

wow, it's wonderful. Thank you for the information.

gihar
June 19, 2014

Kyle,

One day I was trying even to record this text with the acapella robotics voice pronunciation but just right now you convinced me for the natural speech advantage ))

Thank you!

Overview

You can use our built-in RhinoRecorder to record from within your browser, or you may also use the form to upload an audio file for this Audio Request.

Don't have audio recording software? We recommend Audacity. It's free and easy to use.

Sponsored Links