Skip to content
Guest Big Announcement

How to ARM multiply R0 value to a float number

Featured Replies

I want to make the following math:

 

    (N)*1.3

 

N is R0 (arm)

 

How can I multiply R0 by 1.3? (floating number)

 

And keep the result stored at R0?

Solved by Guest

  • Solution

Wrong section bro :p

 

And try this, just dividing 4 by 3 for 1.333... :)

 

VMOV.F32 S0, #4.0
VMOV.F32 S1, #3.0
VDIV.F32 S0, S0, S1
VMUL.F32 S0, #x //x = whatever you want 1.3 multiplied by
VMOV R0, S0

Updated by Guest

  • Author

Wrong section bro :p

 

And try this, just dividing 4 by 3 for 1.333... :)

 

VMOV.F32 S0, #4.0
VMOV.F32 S1, #3.0
VDIV.F32 S0, S0, S1
VMUL.F32 S0, #x //x = whatever you want 1.3 multiplied by
VMOV R0, S0

 

GIVE THIS MAN A MEDAL!

 

 

 

PS: Sorry for posting on wrong section. I was in a rush, read the ARM manual, found some os these functions, but didn't get a clue on doing that! :(

 

PS2: THANK YOU. <3

Create an account or sign in to comment

Featured Content

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.