Sponsored Content
Top Forums Programming C: why decimals considered double by default ? Post 302384015 by limmer on Sunday 3rd of January 2010 07:43:33 AM
Old 01-03-2010
C: why decimals considered double by default ?

Can anybody tell me why any literal constant real numbers are double by default in C ? Why is the default not float ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

handle decimals

Hi All, How we can handle decimals in (Float) in UNIX. a=73 b=5 c=`expr a / b` i am getting 14 but i need full 14.6 . Can any one help me pls? (1 Reply)
Discussion started by: subin_bala
1 Replies

2. Shell Programming and Scripting

Bourne and decimals??

I need to get 15% of the variable exer1 to be added to other exercises so far, i've got exer1=$1 aver=`expr $exer \* .15` but i keep getting an error that an integer value was expected. Is there anyway around this? (1 Reply)
Discussion started by: kdyzsa
1 Replies

3. Shell Programming and Scripting

convert Regular decimals to Packed decimals

Hi, I am trying to find if there is a way to convert regular decimal values to Paced decimal values. I tried to find a c program but I could get a Packed converted to regular decimal not the other way round. If not unix please let me know if any other progrimming language I can use to do... (2 Replies)
Discussion started by: mgirinath
2 Replies

4. Shell Programming and Scripting

Decimals in TCSH

Hello, I want to run a loop with non-integer values (which I know I can't) so I've created a loop of integers and divided it by 10. However, these values are always rounded down to 1 significant figure. How do I get the script to keep and use the decimal value? My script is as follows #... (1 Reply)
Discussion started by: DFr0st
1 Replies

5. UNIX for Dummies Questions & Answers

Regarding Decimals in Cshell

Hello... I am new to unix and I am wondering if in a C-shell script , Are we supposed to use only whole numbers........ for example..if a program needs to calculate the average of some numbers........ @ avg = (($1 +$2 + $3)/3)) is returning a whole number.........How can a decimal be achieved... (1 Reply)
Discussion started by: ravindra22
1 Replies

6. AIX

Background & is considered as Idle

Our Aix Unix has one issue. If I type xedit & after 30 minutes, xedit auto shut down. If I type xedit xedit will run forward. I feel this & doesn't perform as it should be. When I use &, system consider this process as idle. How to fix this issue? Does this mean unix env... (12 Replies)
Discussion started by: david_hu_66
12 Replies

7. Shell Programming and Scripting

Csh Programming Considered Harmful

I have noticed a few posts asking questions about c shell scripting these past few days. This a good read for those that currently or are thinking about writing a csh script: Csh Programming Considered Harmful (9 Replies)
Discussion started by: ilikecows
9 Replies

8. Programming

Why is C/C++ considered low-level languages???

Hi friends, I hope everyone is doing well and fine. I have always been hearing that C/C++ are relatively low-level as compared to Java/C# etc. Could you please tell me some low-level qualities of C/C++? And I think disk deframenters are written in C/C++, please correct me if I am wrong. And please... (5 Replies)
Discussion started by: gabam
5 Replies

9. Shell Programming and Scripting

Considered basic but advanced outcome (Custom Backup Solution)

Ive a problem that I'm reaching out for help. Ive written (With bits and pieces) of script that is not running as expected or is having an issue causing processes to spiral out of control. The script does this: Unloads a UV database server Tars up a few folders Transfers the file to... (11 Replies)
Discussion started by: coastdweller
11 Replies

10. Homework & Coursework Questions

Time command issuing all zeroes (is now considered homework help)

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: A common problem arising in games and simulations is to generate a random arrangements of integers from 1 to N.... (5 Replies)
Discussion started by: lamentofking
5 Replies
J0(3)							   BSD Library Functions Manual 						     J0(3)

NAME
j0, j0f, j1, j1f, jn, jnf, y0, y0f, y1, y1f, yn, ynf -- Bessel functions of first and second kind LIBRARY
Math Library (libm, -lm) SYNOPSIS
#include <math.h> double j0(double x); float j0f(float x); double j1(double x); float j1f(float x); double jn(int n, double x); float jnf(int n, float x); double y0(double x); float y0f(float x); double y1(double x); float y1f(float x); double yn(int n, double x); float ynf(int n, float x); DESCRIPTION
The functions j0(), j0f(), j1() and j1f() compute the Bessel function of the first kind of the order 0 and the order 1, respectively, for the real value x; the functions jn() and jnf() compute the Bessel function of the first kind of the integer order n for the real value x. The functions y0(), y0f(), y1() and y1f() compute the linearly independent Bessel function of the second kind of the order 0 and the order 1, respectively, for the positive integer value x (expressed as a double); the functions yn() and ynf() compute the Bessel function of the second kind for the integer order n for the positive integer value x (expressed as a double). RETURN VALUES
If these functions are successful, the computed value is returned, otherwise the global variable errno is set to EDOM and a reserve operand fault is generated. SEE ALSO
math(3) HISTORY
This set of functions appeared in Version 7 AT&T UNIX. BSD
April 19, 1991 BSD
All times are GMT -4. The time now is 04:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy