Git Product home page Git Product logo

cpplabs's Introduction

Hi, I'm Denis Churilov

Full Stack Developer & DevOps Engineer from Saint Petersburg, Russia
GIF

cpplabs's People

Contributors

potat-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cpplabs's Issues

Bug in polynomial multiplication

When I try to multiply two polynomials like this:
https://github.com/CyberPotat42/SUAI-Labs/blob/619dbbbf28ac68fabacb6bf25052866939f0047d/Semester_2/Lab_9/main.cpp#L84-L95

This works great!

x - 1
x - 2
x^2 - 3x + 2

But when i try to multiply them in a loop:
https://github.com/CyberPotat42/SUAI-Labs/blob/619dbbbf28ac68fabacb6bf25052866939f0047d/Semester_2/Lab_9/main.cpp#L105-L118

Then for some reason the wrong answer is given:

input n = 2
input 2 numbers: 1 2

x - 1
x - 2
x^2 - 4x + 4

Perhaps this is due to incorrect handling of pointers or a memory leak
I think it's time for me to sleep 💤

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.