Sponsored Content
Full Discussion: Create polygon around dot
Top Forums Shell Programming and Scripting Create polygon around dot Post 302866283 by RudiC on Monday 21st of October 2013 05:00:33 PM
Old 10-21-2013
Code:
echo asdf | awk '{ printf "%20.20f\n", 4*atan2(1,1); }'
3.14159265358979311600

Default output fmt is "%.6g"

---------- Post updated at 23:00 ---------- Previous update was at 22:48 ----------

Also:
Code:
awk -v OFMT="%.15f" 'BEGIN {Pi=4*atan2(1,1); print sin(Pi); print sin (3.14159)}' 
0.000000000000000
0.000002653589793

This User Gave Thanks to RudiC For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

dot files

Hi, everyone. I'm now using rsync command, and please tell me what is the wildcard for below looks like. I want to chose dotfiles, such as .ipod .apple but i don't want to chose . and .. ------------------ .* doesn't work, of course. Thanks, Euler04 (2 Replies)
Discussion started by: Euler04
2 Replies

2. Shell Programming and Scripting

splitting on dot in perl

I am trying to split input that looks like ,2005-09-12 01:45:00.000000,2005-09-12 01:48:18.000000, I want to split on the dot . What I am using is ($ev_time,$rol)=split(/\./),$inputfile; This does not recognize the dot as what I want to split on. (2 Replies)
Discussion started by: reggiej
2 Replies

3. Linux

Regarding Dot Matrix Printing

Hi all, What I want is that can we manage printing a text file on a Dot Matrix printer installed on a Linux machine and the printer should not take the normal A4 format, but should print only to the extent the text file has text in it. What happen usually is that when we give print comand to any... (0 Replies)
Discussion started by: aman_mlt
0 Replies

4. Shell Programming and Scripting

Replacing dot for comma

I wanted to change 34.66 to 34,66. I tried the command: sed 's/./,/' $NUM Where $NUM is a variable with 34.66 value. The output is ,4.66 (2 Replies)
Discussion started by: bdalmeida
2 Replies

5. UNIX for Dummies Questions & Answers

variable name with dot(.)

Hi, Is it possible to declare variable with name having dot(.) in it ? something like gs.test='HELLO' Thanks in advance :) (1 Reply)
Discussion started by: gopalss
1 Replies

6. UNIX for Dummies Questions & Answers

How to get data only inside polygon created by points which is part of whole data from file?

hiii, Help me out..i have a huge set of data stored in a file.This file has has 2 columns which is latitude & longitude of a region. Now i have a program which asks for the number of points & based on this number it asks the user to enter that latitude & longitude values which are in the same... (7 Replies)
Discussion started by: reva
7 Replies

7. Shell Programming and Scripting

How to Removing a dot from a file name?

I need a script that will allow me to rename all of my files in subdir /FilesIn as follows: From kumc_835_111200.RMT.dat to kumc_835_111200RMT.dat kumc_835_111200.KMR.dat to kumc_835_111200KMR.dat .................etc How do I do that whithout doing a sed ... (10 Replies)
Discussion started by: mrn6430
10 Replies

8. Shell Programming and Scripting

Remove prefixes before dot

Shell : Bash shell I have a text file with entries like below srv.sr_num sr_number, atvx.ATTRIB_37 Product_Name, ktx.X_ATTRIB_52 Product_Type, mkx.created sr_created_date, nbv.sr_cat_type_cd sr_type, bkrx.sr_area sr_category, .. frx.order_id, des.stats_name , fpxg.current_id_name, ...... .... (3 Replies)
Discussion started by: John K
3 Replies

9. Shell Programming and Scripting

Mv or cp with a . (dot)?

How can I rename a file with a . prefix? I actually need to copy the file but the . seems to be very tough to do. mv ./bla ../fa/la/.bla - doesn't work. I've tried all sorts of bracketing and that doesn't work. Maybe the only way to do it would be to name the file _.bla then rename it... (19 Replies)
Discussion started by: scribling
19 Replies
ATAN2(3)						   BSD Library Functions Manual 						  ATAN2(3)

NAME
atan2 -- arc tangent function of two variables SYNOPSIS
#include <math.h> double atan2(double y, double x); long double atan2l(long double y, long double x); float atan2f(float y, float x); DESCRIPTION
The atan2() function computes the principal value of the arc tangent of y/x, using the signs of both arguments to determine the quadrant of the return value. SPECIAL VALUES
atan2(+-0, -0) returns +-pi. atan2(+-0, +0) returns +-0. atan2(+-0, x) returns +-pi for x < 0. atan2(+-0, x) returns +-0 for x > 0. atan2(y, +-0) returns +pi/2 for y > 0. atan2(y, +-0) returns -pi/2 for y < 0. atan2(+-y, -infinity) returns +-pi for finite y > 0. atan2(+-y, +infinity) returns +-0 for finite y > 0. atan2(+-infinity, x) returns +-pi/2 for finite x. atan2(+-infinity, -infinity) returns +-3*pi/4. atan2(+-infinity, +infinity) returns +-pi/4. NOTES
The atan2() function is used mostly to convert from rectangular (x,y) to polar (r,theta) coordinates that must satisfy x = r*cos theta and y = r*sin theta. In general, conversions to polar coordinates should be computed thus: r := hypot(x,y); ... := sqrt(x*x+y*y) theta := atan2(y,x). VECTOR OPERATIONS
If you need to apply the atan2() function to SIMD vectors or arrays, using the following functions provided by the Accelerate.framework may give significantly better performance: #include <Accelerate/Accelerate.h> vFloat atan2f(vFloat y, vFloat x); void vvatan2f(float *z, const float *y, const float *x, const int *n); void vvatan2(double *z, const double *y, const double *x, const int *n); SEE ALSO
acos(3), asin(3), atan(3), cos(3), cosh(3), sin(3), sinh(3), tan(3), tanh(3), math(3), STANDARDS
The atan2() function conforms to ISO/IEC 9899:2011. BSD
December 11, 2006 BSD
All times are GMT -4. The time now is 02:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy