Subversion Repositories DashDisplay

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 5
Line 1... Line 1...
1
/* ----------------------------------------------------------------------    
1
/* ----------------------------------------------------------------------    
2
* Copyright (C) 2010-2014 ARM Limited. All rights reserved.  
2
* Copyright (C) 2010-2014 ARM Limited. All rights reserved.  
3
*    
3
*    
4
* $Date:        19. March 2015
4
* $Date:        19. October 2015
5
* $Revision:    V.1.4.5
5
* $Revision:    V.1.4.5 a
6
*    
6
*    
7
* Project:      CMSIS DSP Library  
7
* Project:      CMSIS DSP Library  
8
* Title:                arm_sqrt_q31.c    
8
* Title:                arm_sqrt_q31.c    
9
*    
9
*    
10
* Description:  Q31 square root function.    
10
* Description:  Q31 square root function.    
Line 96... Line 96...
96
    temp_float1 = number * 4.6566128731e-010f;
96
    temp_float1 = number * 4.6566128731e-010f;
97
    /*Store as integer */
97
    /*Store as integer */
98
    tempconv.floatval = temp_float1;
98
    tempconv.floatval = temp_float1;
99
    bits_val1 = tempconv.fracval;
99
    bits_val1 = tempconv.fracval;
100
    /* Subtract the shifted value from the magic number to give intial guess */
100
    /* Subtract the shifted value from the magic number to give intial guess */
101
    bits_val1 = 0x5f3759df - (bits_val1 >> 1);  // gives initial guess  
101
    bits_val1 = 0x5f3759df - (bits_val1 >> 1);  /* gives initial guess */
102
    /* Store as float */
102
    /* Store as float */
103
    tempconv.fracval = bits_val1;
103
    tempconv.fracval = bits_val1;
104
    temp_float1 = tempconv.floatval;
104
    temp_float1 = tempconv.floatval;
105
    /* Convert to integer format */
105
    /* Convert to integer format */
106
    var1 = (q31_t) (temp_float1 * 1073741824);
106
    var1 = (q31_t) (temp_float1 * 1073741824);