Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7925579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T18:21:19+00:00 2026-06-03T18:21:19+00:00

I was doing the integration task with FPU before, now I’m struggling with SSE.

  • 0

I was doing the integration task with FPU before, now I’m struggling with SSE.

My main problem is when I was using FPU stack, there was the fsin function, which could be used on the number, which is at the top of the stack (st0).

Now I want to calculate the sine of my all four numbers in XMM0, or calculate it somewhere else and move into XMM0. I’m using the AT&T syntax.

I think the second idea is actually possible, but I don’t know how 🙂

Does anybody know how to do it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T18:21:21+00:00Added an answer on June 3, 2026 at 6:21 pm

    Three options:

    1. Use and existing library that computes sin on SSE vectors.
    2. Write your own vector sin function using SSE.
    3. Store the vector to memory, use fsin to compute the sine of each element, and load the results. Assuming that your stack is 16-byte aligned and has 16-bytes of space, something like this:

         movaps  %xmm0, (%rsp)
         mov     $3,     %rcx
      0: flds   (%rsp,%rcx,4)
         fsin
         fstps  (%rsp,%rcx,4)
         sub     $1,     %rcx
         jns     0b
      

    (1) is almost certainly your best bet performance-wise, and is also the easiest. If you have significant experience writing vector code and know a priori that the arguments fall into some range, you may be able to get better performance with (2). Using fsin will work, but it’s ugly and slow and not particularly accurate, if that matters.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class that creates a file. I am now doing integration tests
I am doing homework in Matlab, calculating numeric integration using different methods like simpson,
I am doing some integration with Facebook Open Graph using their oAuth flow and
As part of an integration task I am doing, I have a column in
I've been doing some reading about continuous integration recently and there is a scenario
I'm doing some integration with Facebook on a project (using graph api) and everything
Well I'm doing some Java - C integration, and throught C library werid type
Doing an ajax get request works as expected using the following code: $.ajax({ type:
Doing the below will reproduce my problem: New WPF Project Add ListView Name the
My task was to deal with problem of 5 eating thinkers. Each of them

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.