Sponsored Content
Full Discussion: Help on Modulus
Top Forums UNIX for Dummies Questions & Answers Help on Modulus Post 302524447 by Ariean on Monday 23rd of May 2011 10:39:37 AM
Old 05-23-2011
Quote:
Originally Posted by royalibrahim
First set the floating point precision using the bc command's "scale"
Code:
echo "scale=1; 100/200" | bc

# Ans: 0.5
It is not working when i am doing modulus operation.
Quote:
echo "scale=1; $((0.166667%5))" | bc
Ans:0
expected output:
Quote:
select mod(0.166667,5) from dual
0.166667
 

3 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help in modulus operator in Bash

Hi, I would like to know given that i have two columns and I would like to take the positive integer of the differences between the two columns. which means |3-2|=1; |2-3|=1 as well. I would like to know do Bash recognize | | as well for this purposes? Thanks. -Jason (2 Replies)
Discussion started by: ahjiefreak
2 Replies

2. Shell Programming and Scripting

Modulus operator

What is the modulus operator in korn shell?? (5 Replies)
Discussion started by: manash.paul
5 Replies

3. Shell Programming and Scripting

awk Division and modulus

I need to read the file divide 3 column with 2nd and run a modulus of 10 and check whether the remainder is zero or not if not print the entire line. cat filename | awk '{ if ($3 / $2 % 10 != 0) print $0}' Whats wrong with it ? (4 Replies)
Discussion started by: dinjo_jo
4 Replies
gnutls_rsa_export_get_pubkey(3) 				      gnutls					   gnutls_rsa_export_get_pubkey(3)

NAME
gnutls_rsa_export_get_pubkey - API function SYNOPSIS
#include <gnutls/compat.h> int gnutls_rsa_export_get_pubkey(gnutls_session_t session, gnutls_datum_t * exponent, gnutls_datum_t * modulus); ARGUMENTS
gnutls_session_t session is a gnutls session gnutls_datum_t * exponent will hold the exponent. gnutls_datum_t * modulus will hold the modulus. DESCRIPTION
This function will return the peer's public key exponent and modulus used in the last RSA-EXPORT authentication. The output parameters must be freed with gnutls_free(). RETURNS
On success, GNUTLS_E_SUCCESS (0) is returned, otherwise an error code is returned. REPORTING BUGS
Report bugs to <bug-gnutls@gnu.org>. General guidelines for reporting bugs: http://www.gnu.org/gethelp/ GnuTLS home page: http://www.gnu.org/software/gnutls/ COPYRIGHT
Copyright (C) 2012 Free Software Foundation, Inc.. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. SEE ALSO
The full documentation for gnutls is maintained as a Texinfo manual. If the info and gnutls programs are properly installed at your site, the command info gnutls should give you access to the complete manual. As an alternative you may obtain the manual from: http://www.gnu.org/software/gnutls/manual/ gnutls 3.1.15 gnutls_rsa_export_get_pubkey(3)
All times are GMT -4. The time now is 02:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy