Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,848 questions

51,769 answers

573 users

How to use scalblnl function to multiplies a long double by (FLT_RADIX raised to power exp) in C

1 Answer

0 votes
#include<stdio.h>
#include <math.h>

#include <float.h> // FLT_RADIX

int main(void) {
    printf("%d\n", FLT_RADIX); // 2

    printf("%Lf\n", scalblnl(4.0, 4)); // 4.0 * (2 ^ 4)
    printf("%Lf\n", scalblnl(3.6, -8)); // 3.6 * (2 ^ -8)
    printf("%Lf\n", scalblnl(5.8, 0)); // If exp is 0 then arg is returned

	return 0;
}




/*
run:

2
64.000000
0.014063
5.800000

*/

 



answered Aug 2, 2022 by avibootz
...