Sponsored Content
Top Forums Programming Strange value of the double type variable: -nan(0x8000000000000) Post 302903874 by 915086731 on Friday 30th of May 2014 08:54:21 AM
Old 05-30-2014
assembly code
Code:
       tmp1 = (simtime - seg->time) / currdisk->rotatetime;
0x0808fdf4  <disk_buffer_sector_done+559>:  fldl   0x80b2208
0x0808fdfa  <disk_buffer_sector_done+565>:  mov    -0x38(%ebp),%eax
0x0808fdfd  <disk_buffer_sector_done+568>:  fldl   (%eax)
0x0808fdff  <disk_buffer_sector_done+570>:  fsubrp %st,%st(1)
0x0808fe01  <disk_buffer_sector_done+572>:  mov    0x8(%ebp),%eax
0x0808fe04  <disk_buffer_sector_done+575>:  fldl   0xc4(%eax)
0x0808fe0a  <disk_buffer_sector_done+581>:  fdivrp %st,%st(1)
0x0808fe0c  <disk_buffer_sector_done+583>:  fstpl  -0x28(%ebp)
      currdisk->currangle += tmp1;
0x0808fe0f  <disk_buffer_sector_done+586>:  mov    0x8(%ebp),%eax
0x0808fe12  <disk_buffer_sector_done+589>:  fldl   0x284(%eax)
0x0808fe18  <disk_buffer_sector_done+595>:  faddl  -0x28(%ebp)
0x0808fe1b  <disk_buffer_sector_done+598>:  mov    0x8(%ebp),%eax
0x0808fe1e  <disk_buffer_sector_done+601>:  fstpl  0x284(%eax)


Last edited by 915086731; 05-30-2014 at 10:01 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem with variable type

Dear All, I am trying to write an script to calculate geometric centre of selected residues of a protein structure. Say I have a PDB file (a text containing the x, y, and z coordinates of atoms of a protein). I want to extract the X coordinates of the atoms belonging to the interested residues... (2 Replies)
Discussion started by: siavoush
2 Replies

2. Shell Programming and Scripting

how to get type of variable in perl

hello all how can i get the type of variable in perl like typeof(var); in javascript for instance ? to know if the variable is int or string ? (2 Replies)
Discussion started by: umen
2 Replies

3. Shell Programming and Scripting

getting type of variable

Hello: Is there any way to tell the type of a passed or entered variable, if it is a string or integer,...etc. Thanks a lot (2 Replies)
Discussion started by: aladdin
2 Replies

4. Shell Programming and Scripting

Perl variable type assessment

Hello experts, How we can find out,that what is type of a scalar variable? i.e a scalar var contain a number or a string. Thanks in advance. (8 Replies)
Discussion started by: Zaxon
8 Replies

5. Shell Programming and Scripting

Strange variable comparison result in awk

So, I'm making a little awk script that generates a range-based histogram of a set of numbers. I've stumbled onto a strange thing. Toward the end of the process, I have this test: if ( bindex < s ) "bindex" is the "index" of my "bin" (the array element that gets incremented whenever a... (2 Replies)
Discussion started by: treesloth
2 Replies

6. Shell Programming and Scripting

What is a type of this variable?

I have a question about the type of this variable checkU= sudo cat /etc/passwd: grep $uname: wc -l I write a script to check the existent of username that get from the keyboard. If there is no username,it will create the username else it show the 'Duplicate name" message. The problem is it... (4 Replies)
Discussion started by: thsecmaniac
4 Replies

7. Shell Programming and Scripting

Strange type mistake?!

Hi, I want to start MY_PROGRAM in a bash script with additional parameters given in the CONFIGURATION_ARRAY. IFS="'" CONFIGURATION_ARRAY=( '-N 0 -m 0' '-N 0 -m 1' ) for configuration in ${CONFIGURATION_ARRAY} do //DEBUG N=${configuration%-*} //-N 0 M=-${configuration##*-} //-m 0... (5 Replies)
Discussion started by: xraystorm
5 Replies

8. Shell Programming and Scripting

Strange Phenomena with records filed in variable

Trying to find out whether there is a limit for the number of records that can be stored in a variable I set up this small script: #!/usr/bin/ksh for ((i = 1; i < 21; i++)) do n=$(($i*100)) echo "Trying $n records:" recs=$(head -$n error.log) echo "$recs" | wc done ... (9 Replies)
Discussion started by: Cochise
9 Replies

9. Red Hat

Double data type C Red Hat platform problem

I'm converting a binary file to ASCII using c code. The folllowing block of code prints correct double value 00000.000000000 on HPUNIX platform. longi double; /* C79 - Price Per Minute */ memcpy(&longi,&rbuff,8); fprintf(wfp,"%015.9f ",longi); prints : 00000.000000000 ... (6 Replies)
Discussion started by: krk
6 Replies

10. Shell Programming and Scripting

Bash - concatenate string - strange variable scoping

Hello, I am trying to concatenate a string in a bash script like this: runCmd="docker run -e \"IMAGE_NAME=$IMAGE_NAME\" " env | grep "$ENV_SUFFIX" | while read line; do envCmd="-e \"${line}\" " runCmd=$runCmd$envCmd echo $runCmd # here concatenation works fine done echo... (3 Replies)
Discussion started by: czabak
3 Replies
CPUCTL(4)						   BSD Kernel Interfaces Manual 						 CPUCTL(4)

NAME
cpuctl -- cpuctl pseudo device SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file: device cpuctl Alternatively, to load the driver as a module at boot time, place the following in loader.conf(5): cpuctl_load="YES" DESCRIPTION
The special device /dev/cpuctl presents interface to the system CPU. It provides functionality to retrieve CPUID information, read/write machine specific registers (MSR) and perform CPU firmware updates. For each CPU present in the system, the special device /dev/cpuctl%d with the appropriate index will be created. For multicore CPUs such a special device will be created for each core. Currently, only i386 and amd64 processors are supported. IOCTL INTERFACE
All of the supported operations are invoked using the ioctl(2) system call. Currently, the following ioctls are defined: CPUCTL_RDMSR cpuctl_msr_args_t *args CPUCTL_WRMSR cpuctl_msr_args_t *args Read/write CPU machine specific register. The cpuctl_msr_args_t structure is defined in <sys/cpuctl.h> as: typedef struct { int msr; /* MSR to read */ uint64_t data; } cpuctl_msr_args_t; CPUCTL_MSRSBIT cpuctl_msr_args_t *args CPUCTL_MSRCBIT cpuctl_msr_args_t *args Set/clear MSR bits according to the mask given in the data field. CPUCTL_CPUID cpuctl_cpuid_args_t *args Retrieve CPUID information. Arguments are supplied in the following structure: typedef struct { int level; /* CPUID level */ uint32_t data[4]; } cpuctl_cpuid_args_t; It is equivalent to the CPUCTL_CPUID_COUNT request with level_type set to 0. CPUCTL_CPUID_COUNT cpuctl_cpuid_count_args_t *args Retrieve CPUID information. Arguments are supplied in the following structure: typedef struct { int level; /* CPUID level */ int level_type; /* CPUID level type */ uint32_t data[4]; } cpuctl_cpuid_count_args_t; The level field indicates the CPUID level to retrieve, it is loaded into the %eax register before the CPUID instruction is executed, The level_type field indicates the CPUID level type to retrieve, it is loaded into the %ecx register. The data field is used to store the received CPUID data. That is, data[0] contains the value of %eax register after the CPUID instruction is executed, data[1] is for %ebx, data[2] for %ecx, and data[3] for %edx. CPUCTL_UPDATE cpuctl_update_args_t *args Update CPU firmware (microcode). The structure is defined in <sys/cpuctl.h> as: typedef struct { void *data; size_t size; } cpuctl_update_args_t; The data field should point to the firmware image of size size. For additional information refer to cpuctl.h. RETURN VALUES
[ENXIO] The operation requested is not supported by the device (e.g., unsupported architecture or the CPU is disabled). [EINVAL] Incorrect request was supplied, or microcode image is not correct. [ENOMEM] No physical memory was available to complete the request. [EFAULT] The firmware image address points outside the process address space. FILES
/dev/cpuctl SEE ALSO
hwpmc(4), cpucontrol(8) HISTORY
The cpuctl driver first appeared in FreeBSD 7.2. AUTHORS
The cpuctl module and this manual page were written by Stanislav Sedov <stas@FreeBSD.org>. BUGS
Yes, probably, report if any. BSD
June 20, 2014 BSD
All times are GMT -4. The time now is 07:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy